def validate_pair(ob: Any) -> bool:
    """
    Does the object have length 2?
    """
    try:
        if len(ob) != 2:
            log.warning("Unexpected result: {!r}", ob)
            raise ValueError()
    except ValueError:
        return False
    return True
Does the object have length 2?