def METHOD_NAME():
    # prompt of length 8 + max_length of 3 = 11, which is more than model_max_length of 10, so we resize to 7
    mock_tokens = ["I", "am", "a", "tokenized", "prompt", "of", "length", "eight"]
    mock_prompt = "I am a tokenized prompt of length"
    with patch(
        "haystack.nodes.prompt.invocation_layer.handlers.AutoTokenizer.from_pretrained", autospec=True
    ) as mock_tokenizer:
        tokenizer_instance = mock_tokenizer.return_value
        tokenizer_instance.tokenize.return_value = mock_tokens
        tokenizer_instance.convert_tokens_to_string.return_value = mock_prompt
        prompt_handler = DefaultPromptHandler("model_path", 10, 3)
        result = prompt_handler(mock_prompt)
    assert result == {
        "resized_prompt": mock_prompt,
        "prompt_length": 8,
        "new_prompt_length": 7,
        "model_max_length": 10,
        "max_length": 3,
    }