code: def test_isnan_isinf_forward(seed, fname, ctx, func_name):
      from nbla_test_utils import function_tester
  
      np_fun = getattr(np, fname)
      nn_fun = getattr(F, fname)
      rng = np.random.RandomState(seed)
      inputs = [rng.randn(2, 3, 4).astype(np.float32)]
      inputs[0][rng.rand(*inputs[0].shape) > 0.5] = getattr(
          np, fname.replace("is", "")
      )
  
      def ref_forward(x):
          return np_fun(x).astype(np.int32).astype(np.float32)
  
      function_tester(
          rng,
          nn_fun,
          ref_forward,
          inputs,
          backward=[False],
          ctx=ctx,
          func_name=func_name,
      )
  
imports: import pytest
  import numpy
  import nnabla.functions
  from nbla_test_utils import list_ctx_and_func_name2
label_desc: Use image node_id 1 for calling a global function with example usage: test_isnan_isinf_forward(seed, fname, ctx, func_name) and returns: np_fun