code: def cumprod(
      a: ArrayLike,
      axis: AxisLike = None,
      dtype: Optional[DTypeLike] = None,
      out: Optional[OutArray] = None,
  ):
      if dtype == torch.bool:
          dtype = _dtypes_impl.default_dtypes().int_dtype
      if dtype is None:
          dtype = a.dtype
  
      (a,), axis = _util.axis_none_flatten(a, axis=axis)
      axis = _util.normalize_axis_index(axis, a.ndim)
  
      return a.cumprod(axis=axis, dtype=dtype)
  
imports: from __future__ import annotations
  import functools
  from typing import Optional
  import torch
  from .None import _dtypes_impl, _util
  from ._normalizations import ArrayLike, AxisLike, DTypeLike, KeepDims, NotImplementedType, OutArray
label_desc: Use image node_id 17 for calling a global function with example usage: cumprod(a, axis, dtype, out) and returns: a