@staticmethod
def get_name_n_params(name, deflt=None):
    """Extract name and params from string like 'name(params)'"""
    deflt = '' if deflt is None else deflt
    i = name.find('(')
    j = name.rfind(')')
    if i >= 0 and j >= i:
        n = name[:i].strip()
        p = name[i + 1:j].strip()
    else:
        n = name.strip()
        p = deflt.strip()
    return n, p
