code: def cumprod(a, axis=None, dtype=None, out=None):
      """Returns the cumulative product of an array along a given axis.
  
      Args:
          a (cupy.ndarray): Input array.
          axis (int): Axis along which the cumulative product is taken. If it is
              not specified, the input is flattened.
          dtype: Data type specifier.
          out (cupy.ndarray): Output array.
  
      Returns:
          cupy.ndarray: The result array.
  
      .. seealso:: :func:`numpy.cumprod`
  
      """
      return _math.scan_core(
          a, axis, _math.scan_op.SCAN_PROD, dtype, out
      )
  
imports: import warnings
  import numpy
  import cupy
  from cupy._core import _routines_math
  from cupy._core import _fusion_thread_local
  from cupy._core import internal
label_desc: Use image node_id 6 for calling a global function with example usage: cumprod(a, axis, dtype, out) and returns: _math