def define_command(subparsers, command, callback):
    """Define a command in the subparsers collection.

    :param subparsers: subparsers collection where the command will go
    :param command: command name
    :param callback: function that will be used to process the command
    """
    desc = callback.__doc__ or ''
    help = desc.strip().split('\n')[0]
    arguments = getattr(callback, 'arguments', [])
    subparser = subparsers.add_parser(command, help=help, description=desc)
    for args, kwargs in arguments:
        subparser.add_argument(*args, **kwargs)
    subparser.set_defaults(func=callback)
