code: def test_batch_matmul_forward_backward(
      seed,
      reduce_dim,
      row_a,
      col_b,
      transpose_a,
      transpose_b,
      batch_dims_a,
      batch_dims_b,
      ctx,
      func_name,
  ):
      from nbla_test_utils import function_tester
  
      if transpose_a:
          shape_a = (reduce_dim, row_a)
      else:
          shape_a = (row_a, reduce_dim)
      if transpose_b:
          shape_b = (col_b, reduce_dim)
      else:
          shape_b = (reduce_dim, col_b)
      shape_a = batch_dims_a + shape_a
      shape_b = batch_dims_b + shape_b
  
      rng = np.random.RandomState(seed)
      # Input
      inputs = [
          rng.randn(*shape_a).astype(np.float32),
          rng.randn(*shape_b).astype(np.float32),
      ]
      function_tester(
          rng,
          F.batch_matmul,
          ref_batch_matmul,
          inputs,
          func_args=[transpose_a, transpose_b],
          atol_b=2e-2,
          dstep=1e-3,
          ctx=ctx,
          func_name=func_name,
      )
  
imports: import pytest
  import numpy
  import nnabla.functions
  from nbla_test_utils import list_context
label_desc: Use image node_id 2 for calling a global function with example usage: test_batch_matmul_forward_backward(seed, reduce_dim, row_a, col_b, transpose_a, transpose_b, batch_dims_a, batch_dims_b, ctx, func_name) without return types