def params_from_signature(sig):
    try:
        args = re.match(SIG_RE, sig).group('args')
    except AttributeError:
        raise ValueError(
            u'Method signature syntax "{sig}" is incorrect.'.format(sig=sig))
    try:
        lot = []  # Return value ``[(name, type, optional), ...]``
        if len(args) > 0:
            args = args.split(', ')
            opt_flag = False
            for arg in args:
                match = re.match(ARG_RE, arg)
                if match.group('optional') is not None:
                    optional = True
                    opt_flag = True
                else:
                    if opt_flag:  # Optional params already encountered.
                        raise ValueError(
                            u'Required params must come before optional '
                            'params in "{sig}".'.format(sig=sig))
                    optional = False
                lot.append(
                    (match.group('name'), match.group('type'), optional))
        return lot
    except AttributeError:
        raise ValueError(
            u'Method signature params syntax "{sig}" is incorrect '.format(
                sig=sig))
Takes a method signature, such as ``sig_example``. Returns a list of
dataset/ETHPy150Open orokusaki/django-jsonrpc-2-0/jsonrpc/signatures.py/params_from_signature