code: def _assert_all_close(output, expected_output):
      try:
          assert np.allclose(output, expected_output, atol=tol)
      except AssertionError as ae:
          mean_diff = np.mean(np.absolute(output - expected_output))
          max_diff = np.max(np.absolute(output - expected_output))
          if mean_diff <= tol:
              print("Max difference above tolerance, but mean OK.")
          else:
              raise AssertionError(
                  "Mean diff: {}, Max diff: {}".format(
                      mean_diff, max_diff
                  )
              ) from ae
  
imports: import numpy
  import scipy.sparse
  import tensorflow
  from spektral.data.utils import to_disjoint
  from spektral.layers import ops
  from spektral.utils import convolution
  from spektral.utils.sparse import sp_batch_to_sp_tensor, sp_matrix_to_sp_tensor
label_desc: Use image node_id 1 for calling a global function with example usage: _assert_all_close(output, expected_output) without return types