def _get_comparable_seq(seq_i, seq_j, start_phase, end_phase):
    """
    Return the residues of the exon/subexon that can be shared.

    It takes into account that first/last residue could be different
    if the start/end phase is different from 0 or -1.

    >>> _get_comparable_seq("ASMGSLTSSPSSL", "TSMGSLTSSPSSC", 1, 2)
    ('SMGSLTSSPSS', 'SMGSLTSSPSS')
    """

    if start_phase in [1, 2]:
        seq_i = seq_i[1:]
        seq_j = seq_j[1:]

    if end_phase in [1, 2]:
        seq_i = seq_i[:-1]
        seq_j = seq_j[:-1]

    return seq_i, seq_j