def add_arg(f, *args, **kwargs):

    if not hasattr(f, 'arguments'):
        f.arguments = []

    # NOTE(sirp): avoid dups that can occur when the module is shared across
    # tests.
    if (args, kwargs) not in f.arguments:
        # Because of the sematics of decorator composition if we just append
        # to the options list positional options will appear to be backwards.
        f.arguments.insert(0, (args, kwargs))
Bind CLI arguments to a shell.py `do_foo` function.
dataset/ETHPy150Open kwminnick/rackspace-dns-cli/dnsclient/utils.py/add_arg