code: def script_tokenizer_and_model(session_mocker, model):
      """
      This loads the source from script_tokenizer_and_model.py script and executes main
      We do this through import lib instead of just running the script to inject our smaller model
      """
      script_path = os.path.join(
          EXAMPLE_ROOT_DIR, "script_tokenizer_and_model.py"
      )
  
      loader = importlib.machinery.SourceFileLoader(
          "script_tokenizer_and_model", script_path
      )
      spec = importlib.util.spec_from_loader(
          "script_tokenizer_and_model", loader
      )
      script_tokenizer_and_model = importlib.util.module_from_spec(spec)
  
      sys.modules[
          "script_tokenizer_and_model"
      ] = script_tokenizer_and_model
  
      loader.exec_module(script_tokenizer_and_model)
      session_mocker.patch(
          "script_tokenizer_and_model.XLMR_BASE_ENCODER.get_model",
          return_value=model,
      )
  
      yield script_tokenizer_and_model
  
      del sys.modules["script_tokenizer_and_model"]
  
imports: import importlib
  import json
  import os
  import shutil
  import sys
  import time
  from argparse import Namespace
  from pathlib import Path
  import pytest
  import requests
  import test_utils
  import torch
  from model_archiver import ModelArchiverConfig
  from test_utils import REPO_ROOT
  from ts.torch_handler.unit_tests.test_utils.mock_context import MockContext
label_desc: Use image node_id 3 for calling a global function with example usage: script_tokenizer_and_model(session_mocker, model) without return types