

def add_parser(subparsers):
    group_parser = subparsers.add_parser('group', help='Edit groups and membership')
    group_parser.set_defaults(func=group_command)
    group_subparser = group_parser.add_subparsers(dest='subcommand')
    group_join_parser = group_subparser.add_parser('add_member', help='Join a user to a group')
    group_join_parser.add_argument('groupname')
    group_join_parser.add_argument('username', nargs='+')
    group_join_type_parser = group_join_parser.add_mutually_exclusive_group(required=True)
    group_join_type_parser.add_argument('--member', action='store_true')
    group_join_type_parser.add_argument('--owner', action='store_true')
    group_join_type_parser.add_argument('--np-owner', action='store_true')
    group_join_type_parser.add_argument('--manager', action='store_true')
    group_remove_parser = group_subparser.add_parser('remove_member', help='Remove a user from a group')
    group_remove_parser.add_argument('groupname')
    group_remove_parser.add_argument('username', nargs='+')

dataset/ETHPy150Open dropbox/grouper/grouper/ctl/group.py add_parser/original