human
I wrote the below code

    def get_path_source_asn(path):
        asn = None
        if (path.source is None):
            asn = local_asn
        else:
            asn = path.source.remote_as
        return asn
    p1_asn = get_path_source_asn(path1)
    p2_asn = get_path_source_asn(path2)
    if ((p1_asn == local_asn) and (p2_asn != local_asn)):
        return path2
    if ((p2_asn == local_asn) and (p1_asn != local_asn)):
        return path1
    return None

What's a good function header?

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

def _cmp_by_asn(local_asn, path1, path2):