code: def test_modes_ops():
      ns = [10, 5, 8]
      x_list = [np.random.randn(n, 3) for n in ns]
      a_list = [sp.csr_matrix(np.ones((n, n))) for n in ns]
  
      x, a, i = to_disjoint(x_list, a_list)
      a = sp_matrix_to_sp_tensor(a)
  
      expected_x = np.zeros((len(ns), max(ns), 3))
      for i_, n in enumerate(ns):
          expected_x[i_, :n] = x_list[i_]
  
      expected_a = np.zeros((len(ns), max(ns), max(ns)))
      for i_, n in enumerate(ns):
          expected_a[i_, :n, :n] = a_list[i_].A
  
      # Disjoint signal to batch
      result = ops.disjoint_signal_to_batch(x, i).numpy()
  
      assert expected_x.shape == result.shape
      assert np.allclose(expected_x, result, atol=tol)
  
      # Disjoint adjacency to batch
      result = ops.disjoint_adjacency_to_batch(a, i).numpy()
  
      assert expected_a.shape == result.shape
      assert np.allclose(expected_a, result, atol=tol)
  
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 13 for calling a global function with example usage: test_modes_ops() without return types