code: def prod(
      x: Union[ivy.Array, ivy.NativeArray],
      /,
      *,
      axis: Optional[Union[int, Sequence[int]]] = None,
      dtype: Optional[Union[ivy.Dtype, ivy.NativeDtype]] = None,
      keepdims: bool = False,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Calculate the product of input array x elements.
  
      **Special Cases**
  
      Let ``N`` equal the number of elements over which to compute the product.
  
      -  If ``N`` is ``0``, the product is ``1`` (i.e., the empty product).
  
      For both both real-valued and complex floating-point operands, special
      cases must be handled as the operation is implemented by successive application
      of :func:`ivy.multiply`:
  
      Parameters
      ----------
      x
          input array. Should have a numeric data type.
      axis
          axis or axes along which products must be computed. By default, the product must
          be computed over the entire array. If a tuple of integers, products must be
          computed over multiple axes. Default: ``None``.
      keepdims
          bool, if True, the reduced axes (dimensions) must be included in the result as
          singleton dimensions, and, accordingly, the result must be compatible with the
          input array (see Broadcasting). Otherwise, if False, the reduced axes
          (dimensions) must not be included in the result. Default: ``False``.
      dtype
          data type of the returned array. If None,
          if the default data type corresponding to the data type “kind” (integer or
          floating-point) of x has a smaller range of values than the data type of x
          (e.g., x has data type int64 and the default data type is int32, or x has data
          type uint64 and the default data type is int64), the returned array must have
          the same data type as x. if x has a floating-point data type, the returned array
          must have the default floating-point data type. if x has a signed integer data
          type (e.g., int16), the returned array must have the default integer data type.
          if x has an unsigned integer data type (e.g., uint16), the returned array must
          have an unsigned integer data type having the same number of bits as the default
          integer data type (e.g., if the default integer data type is int32, the returned
          array must have a uint32 data type). If the data type (either specified or
          resolved) differs from the data type of x, the input array should be cast to the
          specified data type before computing the product. Default: ``None``.
      out
          optional output array, for writing the result to.
  
      Returns
      -------
      ret
          array,  if the product was computed over the entire array, a zero-dimensional
          array containing the product; otherwise, a non-zero-dimensional array containing
          the products. The returned array must have a data type as described by the dtype
          parameter above.
  
  
      This method conforms to the `Array API Standard
      <https://data-apis.org/array-api/latest/>`_. This docstring is an extension of the
      `docstring <https://data-apis.org/array-api/latest/
      API_specification/generated/array_api.prod.html>`_
      in the standard.
  
      Both the description and the type hints above assumes an array input for simplicity,
      but this function is *nestable*, and therefore also accepts :class:`ivy.Container`
      instances in place of any of the arguments.
  
      Examples
      --------
      With :class:`ivy.Array` input:
  
      >>> x = ivy.array([1, 2, 3])
      >>> z = ivy.prod(x)
      >>> print(z)
      ivy.array(6)
  
      >>> x = ivy.array([1, 0, 3])
      >>> z = ivy.prod(x)
      >>> print(z)
      ivy.array(0)
  
      >>> x = ivy.array([[3., 4., 5.]])
      >>> y = ivy.prod(x, keepdims=True)
      >>> print(y)
      ivy.array([60.])
  
      >>> x = ivy.array([2., 1.])
      >>> y = ivy.array(0.)
      >>> ivy.prod(x, out=y)
      >>> print(y)
      ivy.array(2.)
  
      >>> x = ivy.array([[-1., -2.], [3., 3.]])
      >>> y = ivy.prod(x, axis=1)
      >>> print(y)
      ivy.array([2., 9.])
  
      With :class:`ivy.Container` input:
  
      >>> x = ivy.Container(a=ivy.array([-1., 0., 1.]), b=ivy.array([1.1, 0.2, 1.4]))
      >>> y = ivy.prod(x)
      >>> print(y)
      {
          a: ivy.array(-0.),
          b: ivy.array(0.30800003)
      }
  
      >>> x = ivy.Container(a=ivy.array([[1., 2.], [3., 4.]]),
      ...                   b=ivy.array([[ 4., 5.], [5., 6.]]))
      >>> y = ivy.prod(x, axis=1, keepdims=True)
      >>> print(y)
      {
          a: ivy.array([[2.],
                        [12.]]),
          b: ivy.array([[20.],
                        [30.]])
      }
      """
      return current_backend(x).prod(
          x, axis=axis, dtype=dtype, keepdims=keepdims, out=out
      )
  
file_path: ivy/ivy/functional/ivy/statistical.py
imports: from typing import Union, Optional, Sequence
  import ivy
  from ivy.utils.backend import current_backend
  from ivy.func_wrapper import handle_array_function, to_native_arrays_and_back, handle_out_argument, handle_nestable, handle_array_like_without_promotion, handle_device, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 5 for calling a global function with example usage: prod() and returns: current_backend