code: def test_matmul_ops_rank_2_3():
      a = np.random.randn(N, N)
      b = np.random.randn(batch_size, N, N)
      convert_to_sparse = [[True, False], [False, True], [True, True]]
  
      expected_output = np.array(
          [a.dot(b[i]) for i in range(batch_size)]
      )
      _check_op(
          ops.modal_dot, [a, b], expected_output, convert_to_sparse
      )
  
      expected_output = np.array(
          [a.T.dot(b[i]) for i in range(batch_size)]
      )
      _check_op(
          ops.modal_dot,
          [a, b],
          expected_output,
          convert_to_sparse,
          transpose_a=True,
      )
  
      expected_output = np.array(
          [a.dot(b[i].T) for i in range(batch_size)]
      )
      _check_op(
          ops.modal_dot,
          [a, b],
          expected_output,
          convert_to_sparse,
          transpose_b=True,
      )
  
      expected_output = np.array(
          [a.T.dot(b[i].T) for i in range(batch_size)]
      )
      _check_op(
          ops.modal_dot,
          [a, b],
          expected_output,
          convert_to_sparse,
          transpose_a=True,
          transpose_b=True,
      )
  
      expected_output = np.array(
          [a.T.dot(b[i]).dot(a) for i in range(batch_size)]
      )
      _check_op(
          ops.matmul_at_b_a, [a, b], expected_output, convert_to_sparse
      )
  
      # Check with outer dimensions that don't match.
      c = np.random.randn(M, N)
      expected_output = np.array(
          [c.dot(b[i]) for i in range(batch_size)]
      )
      _check_op(
          ops.modal_dot, [c, b], expected_output, convert_to_sparse
      )
  
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 8 for calling a global function with example usage: test_matmul_ops_rank_2_3() without return types