def tokens_from_module(module):
    """
    Helper method; takes a module and returns a list of all token classes
    specified in module.__all__.
    Useful when custom tokens are defined in single module.
    """
    return [getattr(module, name) for name in module.__all__]