import typing
import functools


def listify(func: typing.Callable[..., typing.Iterable]) -> typing.Callable[..., typing.List]:
    """Decorator to convert the output of a generator function to a list.

    Args:
        func (typing.Callable[..., typing.Iterable]): the function to be decorated

    Returns:
        typing.Callable[..., typing.List]: the decorated function
    """

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        return list(func(*args, **kwargs))
    return wrapper