def METHOD_NAME(self, extra):
    args = dict()
    positional = list(filter(lambda x: not x.startswith('-'), extra))
    flags = list(filter(lambda x: x.startswith('-'), extra))
    for kv in flags:
        # strip '--' if present
        if kv.startswith('--'):
            kv = kv[2:]
        # attempt to split into key, value pair
        kvs = kv.split('=')
        # use pair if successful, and original option otherwise
        if len(kvs) == 2:
            args[kvs[0]] = kvs[1]
        else:
            args[kv] = ''
    return args, positional