def get_completion_word(details):
    """Find the completed text from some Vim completion data.

    Args:
        details (dict[str, str]):
            Data that comes from Vim after completion finishes. For more
            information, check out Vim's help documentation. `:help
            v:completed_item`.

    Returns:
        str: The completed function.

    """
    user_made_a_completion_selection = details.get('user_data', '') != ''
    if not user_made_a_completion_selection:
        return ''

    return details['word']