def METHOD_NAME(set_custom_handler, handler_name):
    """
    Tests pytorch profiler integration with batch inference
    """
    CUSTOM_PATH = "/tmp/output/resnet-152-batch"
    if os.path.exists(CUSTOM_PATH):
        shutil.rmtree(CUSTOM_PATH)
    assert os.path.exists(data_file_resnet)
    def invoke_batch_input():
        data = open(data_file_resnet, "rb")
        response = requests.post("{}/predictions/resnet152".format(TF_INFERENCE_API), data)
        assert response.status_code == 200
        assert "tiger_cat" in json.loads(response.content)
    with futures.ThreadPoolExecutor(2) as executor:
        for _ in range(2):
            executor.submit(invoke_batch_input)
    assert len(glob.glob("{}/*.pt.trace.json".format(CUSTOM_PATH))) == 1
    test_utils.unregister_model("resnet152")
    shutil.rmtree(CUSTOM_PATH)
    test_utils.torchserve_cleanup()