human
I wrote the below code

    def create_match(cmdname, string, cmdobj):
        "\n                                Builds    a    command    match    by    splitting    the    incoming    string    and\n                                evaluating    the    quality    of    the    match.\n\n                                Args:\n                                                cmdname    (str):    Name    of    command    to    check    for.\n                                                string    (str):    The    string    to    match    against.\n                                                cmdobj    (str):    The    full    Command    instance.\n\n                                Returns:\n                                                match    (tuple):    This    is    on    the    form    (cmdname,    args,    cmdobj,    cmdlen,    mratio),    where\n                                                                `cmdname`    is    the    command's    name    and    `args`    the    rest    of    the    incoming    string,\n                                                                without    said    command    name.    `cmdobj`    is    the    Command    instance,    the    cmdlen    is\n                                                                the    same    as    len(cmdname)    and    mratio    is    a    measure    of    how    big    a    part    of    the\n                                                                full    input    string    the    cmdname    takes    up    -    an    exact    match    would    be    1.0.\n\n                                "
        (cmdlen, strlen) = (len(unicode(cmdname)), len(unicode(string)))
        mratio = (1 - ((strlen - cmdlen) / (1.0 * strlen)))
        args = string[cmdlen:]
        return (cmdname, args, cmdobj, cmdlen, mratio)
    if (not raw_string):
        return []
    matches = []
    l_raw_string = raw_string.lower()
    for cmd in cmdset:
        try:
            matches.extend([create_match(cmdname, raw_string, cmd) for cmdname in ([cmd.key] +...

What's a good function header?
assistant
#Here's a good function header.

def cmdparser(raw_string, cmdset, caller, match_index=None):