def multi_gene_effect_sort_key(effect):
    """
    This function acts as a sort key for choosing the highest priority
    effect across multiple genes (so does not assume that effects might
    involve the same start/stop codons).

    Returns tuple with the following elements:
        1) Integer priority of the effect type.
        2) Does the associated gene have a "protein_coding" biotype?
            False if no gene is associated with effect.
        3) Does the associated transcript have a "protein_coding" biotype?
            False if no transcript is associated with effect.
        4) Is the associated transcript complete?
            False if no transcript is associated with effect.
        5) CDS length
             This value will be 0 if the effect has no associated transcript
             or if the transcript is noncoding or incomplete
        6) Total length of the transcript
             This value will be 0 intra/intergenic variants effects without
             an associated transcript.
        7) Number of exons
             This value will be 0 intra/intergenic variants effects without
             an associated transcript.
        8) If everything is the same up this point then let's use the very
           sloppy heuristic of preferring transcripts like "TP53-201" over
           "TP53-206", so anything ending with "01" is considered better.
        9) Lastly, if we end up with two transcripts like "TP53-202" and
           "TP53-203", prefer the one with the lowest number in the name.
    """

    return tuple([
        effect_priority(effect),
        effect_associated_with_protein_coding_gene(effect),
        effect_associated_with_protein_coding_transcript(effect),
        effect_has_complete_transcript(effect),
        cds_length_of_associated_transcript(effect),
        length_of_associated_transcript(effect),
        number_exons_in_associated_transcript(effect),
        transcript_name_ends_with_01(effect),
        -parse_transcript_number(effect)
    ])
def multi_gene_effect_sort_key ( effect ) : return tuple ( [ effect_priority ( effect ) , effect_associated_with_protein_coding_gene ( effect ) , effect_associated_with_protein_coding_transcript ( effect ) , effect_has_complete_transcript ( effect ) , cds_length_of_associated_transcript ( effect ) , length_of_associated_transcript ( effect ) , number_exons_in_associated_transcript ( effect ) , transcript_name_ends_with_01 ( effect ) , - parse_transcript_number ( effect ) ] )
This function acts as a sort key for choosing the highest priority
    effect across multiple genes (so does not assume that effects might
    involve the same start/stop codons).

    Returns tuple with the following elements:
        1) Integer priority of the effect type.
        2) Does the associated gene have a "protein_coding" biotype?
            False if no gene is associated with effect.
        3) Does the associated transcript have a "protein_coding" biotype?
            False if no transcript is associated with effect.
        4) Is the associated transcript complete?
            False if no transcript is associated with effect.
        5) CDS length
             This value will be 0 if the effect has no associated transcript
             or if the transcript is noncoding or incomplete
        6) Total length of the transcript
             This value will be 0 intra/intergenic variants effects without
             an associated transcript.
        7) Number of exons
             This value will be 0 intra/intergenic variants effects without
             an associated transcript.
        8) If everything is the same up this point then let's use the very
           sloppy heuristic of preferring transcripts like "TP53-201" over
           "TP53-206", so anything ending with "01" is considered better.
        9) Lastly, if we end up with two transcripts like "TP53-202" and
           "TP53-203", prefer the one with the lowest number in the name.