code: def create_cumprod_input(rng, shape, axis, with_mask):
      x = (rng.randn(*shape)).astype(np.float32)
      if with_mask:
          # Make zero elements with the probability of `1 / x_shape[axis]`.
          # It is the probability of existence of one zero element in each scan axis.
          mask = rng.rand(*shape) > (1.0 / shape[axis])
          x = x * mask
      return x
  
file_path: nnabla/python/benchmark/function/test_cumprod.py
imports: import pytest
  import numpy
  import nnabla.functions
  from function_benchmark import FunctionBenchmark, Inspec
label_desc: Use image node_id 1 for calling a global function with example usage: create_cumprod_input(rng, shape, axis, with_mask) and returns: x