(obj: Any)
Check whether ``obj`` is a "record" -- that is, a (text, metadata) 2-tuple.
Check whether ``obj`` is a "record" -- that is, a (text, metadata) 2-tuple.
Check whether obj is a record -- that is a ( text metadata ) 2 - tuple .
def is_record(obj: Any) -> bool:
    """Check whether ``obj`` is a "record" -- that is, a (text, metadata) 2-tuple."""
    if (
        isinstance(obj, tuple)
        and len(obj) == 2
        and isinstance(obj[0], str)
        and isinstance(obj[1], dict)
    ):
        return True
    else:
        return False
def is_record ( obj : Any ) -> bool : if ( isinstance ( obj , tuple ) and len ( obj ) == 2 and isinstance ( obj [ 0 ] , str ) and isinstance ( obj [ 1 ] , dict ) ) : return True else : return False