code: def create_mar_file(work_dir, model_archiver, model_name):
      mar_file_path = work_dir.joinpath(model_name + ".mar")
  
      handler_py_file = work_dir / "handler.py"
      handler_py_file.write_text(HANDLER_PY)
  
      config = ModelArchiverConfig(
          model_name=model_name,
          version="1.0",
          serialized_file=None,
          model_file=None,
          handler=handler_py_file.as_posix(),
          extra_files=None,
          export_path=work_dir,
          requirements_file=None,
          runtime="python",
          force=False,
          archive_format="default",
          config_file=None,
      )
  
      with patch(
          "archiver.ArgParser.export_model_args_parser",
          return_value=config,
      ):
          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_send_intermediate_prediction_response.py
imports: import json
  import shutil
  from pathlib import Path
  from unittest.mock import patch
  import pytest
  import requests
  import test_utils
  from model_archiver import ModelArchiverConfig
label_desc: Use image node_id 3 for calling a global function with example usage: create_mar_file(work_dir, model_archiver, model_name) without return types