def random_sense(ambiguous_word: str, pos=None) -> "wn.Synset":
    """
    Returns a random sense.

    :param ambiguous_word: String, a single word.
    :param pos: String, one of 'a', 'r', 's', 'n', 'v', or None.
    :return: A random Synset.
    """

    if pos is None:
        return custom_random.choice(wn.synsets(ambiguous_word))
    else:
        return custom_random.choice(wn.synsets(ambiguous_word, pos))
def random_sense ( ambiguous_word : str , pos = None ) -> "wn.Synset" : if pos is None : return custom_random . choice ( wn . synsets ( ambiguous_word ) ) else : return custom_random . choice ( wn . synsets ( ambiguous_word , pos ) )
Returns a random sense.

    :param ambiguous_word: String, a single word.
    :param pos: String, one of 'a', 'r', 's', 'n', 'v', or None.
    :return: A random Synset.