code: def create_mar_file(
      work_dir, session_mocker, serialized_file, model_archiver
  ):
      """
      Create mar file and return file path.
      """
      model_name = "scriptable_tokenizer_untrained"
  
      mar_file_path = Path(work_dir).joinpath(model_name + ".mar")
  
      config = ModelArchiverConfig(
          model_name=model_name,
          version="1.0",
          serialized_file=str(serialized_file),
          model_file=SIMPLE_MODEL_FACTORY_PY.as_posix(),
          handler=EXAMPLE_ROOT_DIR.joinpath(
              "dlrm_handler.py"
          ).as_posix(),
          extra_files=EXAMPLE_ROOT_DIR.joinpath(
              "dlrm_factory.py"
          ).as_posix()
          + ","
          + EXAMPLE_ROOT_DIR.joinpath(
              "dlrm_model_config.py"
          ).as_posix(),
          export_path=work_dir,
          requirements_file=None,
          runtime="python",
          force=False,
          archive_format="default",
          config_file=None,
      )
  
      session_mocker.patch(
          "archiver.ArgParser.export_model_args_parser",
          return_value=config,
      )
  
      # Using ZIP_STORED instead of ZIP_DEFLATED reduces test runtime from 54 secs to 10 secs
      from zipfile import ZIP_STORED, ZipFile
  
      session_mocker.patch(
          "model_archiver.model_packaging_utils.zipfile.ZipFile",
          lambda x, y, _: ZipFile(x, y, ZIP_STORED),
      )
  
      model_archiver.generate_model_archive()
  
      assert mar_file_path.exists()
  
      yield mar_file_path.as_posix()
  
      # Clean up files
      mar_file_path.unlink(missing_ok=True)
  
file_path: serve/test/pytest/test_example_torchrec_dlrm.py
imports: import json
  import shutil
  import sys
  from pathlib import Path
  import pytest
  import requests
  import test_utils
  import torch
  from model_archiver import ModelArchiverConfig
  from ts.torch_handler.unit_tests.test_utils.mock_context import MockContext
label_desc: Use image node_id 4 for calling a global function with example usage: create_mar_file(work_dir, session_mocker, serialized_file, model_archiver) without return types