code: def _compare_matrix(mat1, mat2, rel_tol):
      
  
      length = len(mat1)
      if len(mat2) != length:
          return False
  
      for i in range(length):
          if _compare_vector(mat1[i], mat2[i], rel_tol) is False:
              return False
  
      return True
docs: Compares two matrices (nested python lists) for approximate equality.
  
      Each matrix contains floats or strings convertible to floats
  
      This function returns True if both matrices are of the same dimensions
      and each value is within the given relative tolerance.