code: def test_affine_grid_forward_backward(
      seed, ctx, func_name, align_corners, size, batch_size
  ):
      from nbla_test_utils import function_tester
  
      rng = np.random.RandomState(seed)
      theta = create_inputs(rng, batch_size, size)
      inputs = [theta]
      func_args = [size, align_corners]
      function_tester(
          rng,
          F.affine_grid,
          ref_affine_grid,
          inputs,
          func_args=func_args,
          ctx=ctx,
          func_name=func_name,
          backward=[True],
          atol_b=1e-2,
          atol_accum=1e-2,
      )
  
file_path: nnabla/python/test/function/test_affine_grid.py
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  from nbla_test_utils import list_context
  from refs import generate_transformation_2d, generate_transformation_3d, affine_grid_2d, affine_grid_3d
label_desc: Use image node_id 3 for calling a global function with example usage: test_affine_grid_forward_backward(seed, ctx, func_name, align_corners, size, batch_size) without return types