def METHOD_NAME(previous: tkns.Token | None) -> tkns.Token:
    generators = [
        random_plain,
        random_color,
        random_style,
        random_clear,
    ]
    if previous is not None and (previous.is_plain() or previous.is_hyperlink()):
        generators.remove(random_plain)
    return random.choice(generators)()