def to_2tuple(value):
    """Return value or (value, value) if value is not a tuple."""
    if isinstance(value, tuple):
        return value
    if isinstance(value, list):
        return tuple(value)
    return value, value
