def METHOD_NAME(work_dir, session_mocker, model_archiver):
    """
    Create mar file and return file path.
    """
    model_name = "resnet-18"
    mar_file_path = Path(work_dir).joinpath(model_name + ".mar")
    args = Namespace(
        model_name=model_name,
        version="1.0",
        serialized_file=os.path.join(REPO_ROOT_DIR, MODEL_PTH_FILE),
        model_file=EXAMPLE_ROOT_DIR.joinpath("model.py").as_posix(),
        handler="image_classifier",
        extra_files=REPO_ROOT_DIR.joinpath(
            "examples", "image_classifier", "index_to_name.json"
        ).as_posix(),
        export_path=work_dir,
        requirements_file=None,
        runtime="python",
        force=False,
        archive_format="default",
        config_file=None,
    )
    mock = session_mocker.MagicMock()
    mock.parse_args = session_mocker.MagicMock(return_value=args)
    session_mocker.patch(
        "archiver.ArgParser.export_model_args_parser", return_value=mock
    )
    # 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)