code: def create_mar_file(work_dir, model_archiver, model_name, request):
      mar_file_path = Path(work_dir).joinpath(model_name)
  
      model_config_yaml = Path(work_dir) / "model-config.yaml"
      yaml_config = YAML_CONFIG.substitute(request.param)
      model_config_yaml.write_text(yaml_config)
  
      config = ModelArchiverConfig(
          model_name=model_name,
          version="1.0",
          model_file=CURR_FILE_PATH.joinpath(
              "test_data", "streaming", "fake_streaming_model.py"
          ).as_posix(),
          handler=(GPT_PATH / "handler.py").as_posix(),
          serialized_file=None,
          export_path=work_dir,
          requirements_file=None,
          runtime="python",
          force=False,
          config_file=model_config_yaml.as_posix(),
          extra_files=",".join(
              [
                  (GPT_SRC_PATH / f).as_posix()
                  for f in (
                      "generate.py",
                      "model.py",
                      "quantize.py",
                      "tp.py",
                  )
              ]
          ),
          archive_format="no-archive",
      )
  
      model_archiver.generate_model_archive(config)
  
      assert mar_file_path.exists()
  
      yield mar_file_path.as_posix()
  
      # Clean up files
      shutil.rmtree(mar_file_path)
  
imports: import json
  import shutil
  import sys
  from pathlib import Path
  from string import Template
  from unittest.mock import patch
  import pytest
  import requests
  import test_utils
  import torch
  import yaml
  from model_archiver.model_archiver_config import ModelArchiverConfig
  from ts.torch_handler.unit_tests.test_utils.mock_context import MockContext
label_desc: Use image node_id 6 for calling a global function with example usage: create_mar_file(work_dir, model_archiver, model_name, request) without return types