def METHOD_NAME(handler_name):
    """
    This method downloads resnet serialized file, creates mar file and sets up a custom handler
    for running tests
    """
    os.environ["ENABLE_TORCH_PROFILER"] = "true"
    if os.path.exists(DEFAULT_OUTPUT_DIR):
        shutil.rmtree(DEFAULT_OUTPUT_DIR)
    ## Download resnet 152 serialized file
    pathlib.Path(test_utils.MODEL_STORE).mkdir(parents=True, exist_ok=True)
    serialized_file = os.path.join(test_utils.MODEL_STORE, "resnet152-394f9c45.pth")
    if not os.path.exists(serialized_file):
        response = requests.get(
            "https://download.pytorch.org/models/resnet152-394f9c45.pth", allow_redirects=True
        )
        assert response.status_code == 200
        with open(serialized_file, "wb") as f:
            f.write(response.content)
    ## Generate mar file
    cmd = test_utils.model_archiver_command_builder(
        model_name="resnet-152-batch",
        version="1.0",
        model_file=os.path.join(test_utils.CODEBUILD_WD, "examples", "image_classifier", "resnet_152_batch", "model.py"),
        serialized_file=serialized_file,
        handler=handler_name,
        extra_files=os.path.join(test_utils.CODEBUILD_WD, "examples", "image_classifier", "index_to_name.json"),
        force=True,
    )
    print(cmd)
    cmd = cmd.split(" ")
    subprocess.run(cmd, check=True, timeout=1000)
    # Create config properties to enable env vars
    config_properties = os.path.join(test_utils.MODEL_STORE, "config.properties")
    with open(config_properties, "w") as fp:
        fp.write("enable_envvars_config=true")
    test_utils.start_torchserve(
        no_config_snapshots=True, gen_mar=False, snapshot_file=config_properties
    )
    # Register resnet model
    params = {
        "model_name": "resnet152",
        "url": "resnet-152-batch.mar",
        "batch_size": 4,
        "max_batch_delay": 5000,
        "initial_workers": 3,
        "synchronous": "true",
    }
    test_utils.register_model_with_params(params)