code: def test_optimize_criteo(tmpdir):
      input_path = str(tmpdir.mkdir("input"))
      _get_random_criteo_data(1000).to_csv(
          os.path.join(input_path, "day_0"), sep="\t", header=False
      )
      os.environ["INPUT_DATA_DIR"] = input_path
      os.environ["OUTPUT_DATA_DIR"] = str(tmpdir.mkdir("output"))
      with get_cuda_cluster() as cuda_cluster:
          scheduler_port = cuda_cluster.scheduler_address
  
          def _nb_modify(line):
              # Use cuda_cluster "fixture" port rather than allowing notebook
              # to deploy a LocalCUDACluster within the subprocess
              line = line.replace(
                  "download_criteo = True", "download_criteo = False"
              )
              line = line.replace(
                  "cluster = None", f"cluster = '{scheduler_port}'"
              )
              return line
  
          notebook_path = os.path.join(
              dirname(TEST_PATH),
              "examples/scaling-criteo/",
              "01-Download-Convert.ipynb",
          )
          _run_notebook(tmpdir, notebook_path, _nb_modify)
  
file_path: Merlin/tests/unit/examples/test_scaling_criteo_optimize_notebook.py
imports: import itertools
  import json
  import os
  import subprocess
  import sys
  from distutils.spawn import find_executable
  from os.path import dirname, realpath
  import pytest
  import cudf
  from tests.conftest import get_cuda_cluster
label_desc: Use image node_id 1 for calling a global function with example usage: test_optimize_criteo(tmpdir) and returns: line