def elide_sequence(s, flank=5, elision="..."):
    """Trims the middle of the sequence, leaving the right and left flanks.

    Args:
        s (str): A sequence.
        flank (int, optional): The length of each flank. Defaults to five.
        elision (str, optional): The symbol used to represent the part trimmed. Defaults to '...'.
    
        Returns:    
            str: The sequence with the middle replaced by ``elision``.
        
    Examples:
        >>> elide_sequence("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
        'ABCDE...VWXYZ'

        >>> elide_sequence("ABCDEFGHIJKLMNOPQRSTUVWXYZ", flank=3)
        'ABC...XYZ'

        >>> elide_sequence("ABCDEFGHIJKLMNOPQRSTUVWXYZ", elision="..")
        'ABCDE..VWXYZ'

        >>> elide_sequence("ABCDEFGHIJKLMNOPQRSTUVWXYZ", flank=12)
        'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

        >>> elide_sequence("ABCDEFGHIJKLMNOPQRSTUVWXYZ", flank=12, elision=".")
        'ABCDEFGHIJKL.OPQRSTUVWXYZ'
    """

    elided_sequence_len = flank + flank + len(elision)
    if len(s) <= elided_sequence_len:
        return s
    return s[:flank] + elision + s[-flank:]