def METHOD_NAME():
    my_cache = cache.LRUCache[int, Union[int, str]](
        max_cache_items=10,
        expiration_horizon=datetime.timedelta(milliseconds=1),
        retrieval_function=retrieval_function,
    )
    mock_curr_time = datetime.datetime.fromtimestamp(1636730651.079551)
    with patch("datetime.datetime") as mock_datetime:
        mock_datetime.now.return_value = mock_curr_time
        my_cache.put(5)
        mock_datetime.now.return_value += datetime.timedelta(milliseconds=2)
        with pytest.raises(KeyError):
            my_cache.get(5, False)
    with patch("datetime.datetime") as mock_datetime:
        mock_datetime.now.return_value = mock_curr_time
        my_cache.put(5)
        mock_datetime.now.return_value += datetime.timedelta(milliseconds=0.5)
        assert my_cache.get(5, False) == retrieval_function(key=5)