code: def is_valid_adj_mat(A):
      """Returns true if A is a valid adjacency matrix. i.e. it is symmetric and all
      diagonals are 0."""
      return (A == A.T).all() and (A.diagonal() == 0).all()
  
file_path: dragonfly/dragonfly/utils/graph_utils.py
imports: from copy import deepcopy
  import numpy
  from scipy.linalg import eigh
  from .general_utils import get_nonzero_indices_in_vector
label_desc: Use image node_id 3 for calling a global function with example usage: is_valid_adj_mat(A) and returns: unknown