import re


def function_parse(s):
    """
    example:
        f_name, f_args = function_parse("clean(input_file=xxxx, output_file=yyyy)")
        # f_name, f_args -- clean', {'input_file': 'xxxx', 'output_file': 'yyyy'}
    """
    f_name = ""
    f_args = {}
    pattern = r"(\w[\w\d_]*)\((.*)\)$"
    match = re.match(pattern, s)
    if match:
        f_name = match.group(1)
        args = [e.strip() for e in match.group(2).split(",")]
        for e in args:
            kv = e.split("=")
            if len(kv) == 2:
                f_args[kv[0].strip()] = kv[1].strip()
            else:
                f_args[kv[0].strip()] = ""
    return f_name, f_args