code: def test_base_ops():
      convert_to_sparse = [[True]]
  
      # Transpose
      for perm in [(1, 0), (0, 2, 1), (2, 1, 0)]:
          A = np.random.randn(*[N] * len(perm))
          expected_output = np.transpose(A, axes=perm)
          _check_op(
              ops.transpose,
              [A],
              expected_output,
              convert_to_sparse,
              perm=perm,
          )
  
      # Reshape
      A = np.random.randn(4, 5)
      for shape in [(-1, 4), (5, -1)]:
          expected_output = np.reshape(A, shape)
          _check_op(
              ops.reshape,
              [A],
              expected_output,
              convert_to_sparse,
              shape=shape,
          )
  
      # Repeat
      X = np.random.rand(N)
      repeats = np.random.randint(1, 4, N)
      expected_output = np.repeat(X, repeats)
      _check_op(ops.repeat, [X], expected_output, repeats=repeats)
  
      # Matrix power
      A = np.random.randn(N, N)
      k = 4
      expected_output = np.linalg.matrix_power(A, k)
      _check_op(
          ops.matrix_power, [A], expected_output, convert_to_sparse, k=k
      )
  
      A = np.random.randn(batch_size, N, N)
      k = 4
      expected_output = np.array(
          [np.linalg.matrix_power(a, k) for a in A]
      )
      _check_op(
          ops.matrix_power, [A], expected_output, convert_to_sparse, k=k
      )
  
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 12 for calling a global function with example usage: test_base_ops() without return types