human
I wrote the below code

    def compare(a, b):
        if (a == b):
            return 0
        if (b in parentMap[a]):
            return (-1)
        if (a in parentMap[b]):
            return 1
        return ((a > b) - (a < b))
    if PY3:
        return sorted([v for (v, n) in iteritems(serviceNsMap) if (n == namespace)], key=cmp_to_key(compare))
    else:
        return sorted([v for (v, n) in iteritems(serviceNsMap) if (n == namespace)], compare)

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

def GetServiceVersions(namespace):