def did_you_mean(
    word: Hashable, possibilities: Iterable[Hashable], *, n: int = 10
) -> str:
    """
    Suggest a few correct words based on a list of possibilities

    Parameters
    ----------
    word : Hashable
        Word to compare to a list of possibilities.
    possibilities : Iterable of Hashable
        The iterable of Hashable that contains the correct values.
    n : int, default: 10
        Maximum number of suggestions to show.

    Examples
    --------
    >>> did_you_mean("bluch", ("blech", "gray_r", 1, None, (2, 56)))
    "Did you mean one of ('blech',)?"
    >>> did_you_mean("none", ("blech", "gray_r", 1, None, (2, 56)))
    'Did you mean one of (None,)?'

    See also
    --------
    https://en.wikipedia.org/wiki/String_metric
    """
    # Convert all values to string, get_close_matches doesn't handle all hashables:
    possibilities_str: dict[str, Hashable] = {str(k): k for k in possibilities}

    msg = ""
    if len(
        best_str := difflib.get_close_matches(
            str(word), list(possibilities_str.keys()), n=n
        )
    ):
        best = tuple(possibilities_str[k] for k in best_str)
        msg = f"Did you mean one of {best}?"

    return msg

    Suggest a few correct words based on a list of possibilities

    Parameters
    ----------
    word : Hashable
        Word to compare to a list of possibilities.
    possibilities : Iterable of Hashable
        The iterable of Hashable that contains the correct values.
    n : int, default: 10
        Maximum number of suggestions to show.

    Examples
    --------
    >>> did_you_mean("bluch", ("blech", "gray_r", 1, None, (2, 56)))
    "Did you mean one of ('blech',)?"
    >>> did_you_mean("none", ("blech", "gray_r", 1, None, (2, 56)))
    'Did you mean one of (None,)?'

    See also
    --------
    https://en.wikipedia.org/wiki/String_metric
    
xarray/core/utils.py