@staticmethod
def _get_args(cmds, get_all=True):
    """
        Parsing user's input, find args or kwargs in cmds.
        
        Input:
            cmds                    a list of user input, type(list)
            get_all                 if True, all cmd not startswith('--') will add to args.
                                    if False, only return args before kwargs.
        """
    add_arg = True
    args = []
    kwargs = {}
    for cmd in cmds:
        if not cmd.startswith('--'):
            if not get_all:
                add_arg = False
        if cmd.startswith('--'):
            cmd = cmd.lstrip('--')
            splits = cmd.split('=')
            if len(splits) == 1:
                kwargs[cmd] = True
                continue
            key = splits[0]
            value = '='.join(splits[1:])
            kwargs[key] = value
        elif add_arg:
            args.append(cmd)
        else:
            break
    return args, kwargs
