code: def test_transpose_forward_backward(
      seed, inshape, axes, ctx, func_name
  ):
      from nbla_test_utils import function_tester
  
      rng = np.random.RandomState(seed)
      if np.product(inshape) > 1000000:
          with nn.context_scope(ctx):
              x = nn.Variable(inshape)
              y = F.transpose(x, axes)
              y.forward()
              assert (
                  y.d.shape == np.ndarray(inshape).transpose(axes).shape
              )
      else:
          inputs = [rng.randn(*inshape).astype(np.float32)]
          function_tester(
              rng,
              F.transpose,
              ref_transpose,
              inputs,
              func_args=[axes],
              ctx=ctx,
              func_name=func_name,
              atol_f=1e-6,
              atol_b=1e-2,
          )
  
file_path: nnabla/python/test/function/test_transpose.py
imports: import pytest
  import numpy
  import nnabla
  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_transpose_forward_backward(seed, inshape, axes, ctx, func_name) without return types