def METHOD_NAME(set_custom_handler, handler_name):
    """
    Tests pytorch profiler integration with default and custom handler
    """
    assert os.path.exists(data_file_resnet)
    data = open(data_file_resnet, "rb")
    response = requests.post("{}/predictions/resnet152".format(TF_INFERENCE_API), data)
    assert "tiger_cat" in json.loads(response.content)
    assert len(glob.glob("{}/*.pt.trace.json".format(DEFAULT_OUTPUT_DIR))) == 1
    test_utils.unregister_model("resnet152")
    shutil.rmtree(DEFAULT_OUTPUT_DIR)
    test_utils.torchserve_cleanup()