def parse(hub, args=None, namespace=None, only_parse_known_arguments=False):
    """
    Parse the command line options
    """
    if only_parse_known_arguments:
        opts, unknown_args = hub.conf._mem['args']['parser'].parse_known_args(
            args, namespace)
        opts_dict = opts.__dict__
        opts_dict['_unknown_args_'] = unknown_args
    else:
        opts = hub.conf._mem['args']['parser'].parse_args(args, namespace)
        opts_dict = opts.__dict__
    return {'result': True, 'return': opts_dict}
