code: def test_transform_binary_forward_backward(
      fname, ctx, func_name, broadcast_dims, seed
  ):
      from nbla_test_utils import function_tester
  
      atol_f, atol_b = atol_list[fname]
      func = getattr(F, fname)
      ref_func = eval("ref_" + fname)
      rng = np.random.RandomState(seed)
      shape = [2, 3, 4]
      shapes = []
      for i in range(2):
          if broadcast_dims[i] is None:
              shapes.append(shape)
              continue
          s = np.array(shape).copy()
          s[np.array(broadcast_dims[i])] = 1
          shapes.append(s.tolist())
      inputs = get_inputs(fname, shapes, rng)
      function_tester(
          rng,
          func,
          ref_func,
          inputs,
          ctx=ctx,
          func_name=func_name,
          atol_f=atol_f,
          atol_b=atol_b,
      )
  
file_path: nnabla/python/test/function/test_transform_binary.py
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  from nbla_test_utils import function_tester, list_ctx_and_func_name
label_desc: Use image node_id 10 for calling a global function with example usage: test_transform_binary_forward_backward(fname, ctx, func_name, broadcast_dims, seed) without return types