def _repr(elem):
    """Return string representation for tuple (lo, hi).

    Examples:
        "HHHH"
        "HHHH..HHHH"

    Args:
        elem (tuple): 2-tuple (lo, hi)

    Returns:
        str: String representation of range tuple.
    """
    if elem[0] == elem[1]:
        return '%04X' % elem[0]
    return '%04X..%04X' % elem