code: def test_random_erase_recomputation(
      ctx,
      func_name,
      seed,
      prob,
      area_ratios,
      aspect_ratios,
      replacements,
      n,
      share,
      inplace,
      base_axis,
      func_seed,
      channel_last,
  ):
      if channel_last and func_name == "RandomErase":
          pytest.skip(
              "RandomErase with channel_last is only supported in CUDA."
          )
  
      from nbla_test_utils import recomputation_test
  
      rng = np.random.RandomState(seed)
      b, c, h, w = 4, 3, 32, 32
      ishape = [b, h, w, c] if channel_last else [b, c, h, w]
      vinputs = [nn.Variable(ishape)]
  
      func_kwargs = {
          "prob": prob,
          "area_ratios": area_ratios,
          "aspect_ratios": aspect_ratios,
          "replacements": replacements,
          "n": n,
          "share": share,
          "inplace": inplace,
          "base_axis": base_axis,
          "seed": seed,
          "channel_last": channel_last,
      }
  
      recomputation_test(
          rng=rng,
          func=F.random_erase,
          vinputs=vinputs,
          func_args=[],
          func_kwargs=func_kwargs,
          ctx=ctx,
      )
  
file_path: nnabla/python/test/function/test_random_erase.py
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  from test_flip import ref_flip
  from nbla_test_utils import list_context
  from nnabla.testing import assert_allclose
label_desc: Use image node_id 3 for calling a global function with example usage: test_random_erase_recomputation(ctx, func_name, seed, prob, area_ratios, aspect_ratios, replacements, n, share, inplace, base_axis, func_seed, channel_last) without return types