human
I wrote the below code

    def nsstrip(tag):
        for x in ('{tc0}', '{urn:trch}', 't:'):
            if tag.startswith(x):
                return tag.split(x)[1]
        else:
            return tag
    def get_redirection(config):
        for child in config:
            tag = nsstrip(child.tag)
            if (tag == 'redirection'):
                return child
        return None
    def get_remote_redir(node):
        if (not node):
            return []
        return [child for child in node if (nsstrip(child.tag) == 'remote')]
    def get_local_redir(node):
        if (not node):
            return []
        return [child for child in node if (nsstrip(child.tag) == 'local')]
    xmldoc = ElementTree.parse(xmlFile)
    config = xmldoc.getroot()
    redir = get_redirection(config)
    remote = get_remote_redir(redir)
    local = get_local_redir(redir)
    redirection = {'remote': [x.attrib for x in remote], 'local': [x.attrib for x in local]}
    for tunnel in (redirection['remote'] + redirection['local']):
        for (k, v) in tunnel.items():
            if (v.lower() == '//identifier'):
                tunnel[k] = 'TargetIp'
            elif re.match('//service\\[name=.*\\]/port', v.lower()):
                tunnel[k] = 'TargetPort'
    return redirection

What's a good function header?

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

def parse_redirection(xmlFile):