def get_commands():
    """
    Fetch click commands from extension `turnstile.command` entrypoints.
    The click command functions should be named cmd
    :rtype: Iterator[str, Callable]
    """
    for entry_point in pkg_resources.iter_entry_points('turnstile.commands'):
        try:
            module = entry_point.load()
        except __HOLE__:
            continue  # ignore broken commands
        command = module.cmd  # type: FunctionType
        yield entry_point.name, command
dataset/ETHPy150Open zalando/turnstile/turnstile/manager.py/get_commands