code: def test_example_serving_implicit(gpu, tmpdir):
      with testbook(
          REPO_ROOT
          / "examples/traditional-ml/Serving-An-Implicit-Model-With-Merlin-Systems.ipynb",
          execute=False,
          timeout=180,
      ) as tb:
          tb.inject(
              f"""
              import os
              os.environ["OUTPUT_DATA_DIR"] = "{tmpdir}/ensemble"
              os.environ["USE_GPU"] = "{int(gpu)}"
              from unittest.mock import patch
              from merlin.datasets.synthetic import generate_data
              mock_train, mock_valid = generate_data(
                  input="movielens-100k",
                  num_rows=1000,
                  set_sizes=(0.8, 0.2)
              )
              p1 = patch(
                  "merlin.datasets.entertainment.get_movielens",
                  return_value=[mock_train, mock_valid]
              )
              p1.start()
              """,
              pop=True,
          )
  
          tb.execute_cell(list(range(0, 18)))
  
          with run_triton_server(f"{tmpdir}/ensemble", grpc_port=8001):
              tb.execute_cell(list(range(18, len(tb.cells) - 2)))
              pft = tb.ref("predictions_from_triton")
              lp = tb.ref("local_predictions")
              assert pft.shape == lp.shape
  
imports: import shutil
  import pytest
  from testbook import testbook
  from merlin.systems.triton.utils import run_triton_server
  from merlin.core.compat import cudf
  from tests.conftest import REPO_ROOT
label_desc: Use image node_id 1 for calling a global function with example usage: test_example_serving_implicit(gpu, tmpdir) without return types