from typing import Any
from typing import MutableSequence


def is_adjacency_matrix(item: Any) -> bool:
    """Returns whether 'item' is an adjacency matrix."""
    if isinstance(item, tuple):
        item = item[0]
    return (isinstance(item, MutableSequence) 
            and all(isinstance(i, MutableSequence) for i in item))