code: def prod(
      x: torch.Tensor,
      /,
      *,
      axis: Optional[Union[int, Sequence[int]]] = None,
      dtype: Optional[torch.dtype] = None,
      keepdims: bool = False,
      out: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      dtype = ivy.as_native_dtype(dtype)
      if dtype is None:
          dtype = _infer_dtype(x.dtype)
      if axis == ():
          return x.type(dtype)
      if axis is None:
          return torch.prod(input=x, dtype=dtype)
      if isinstance(axis, (tuple, list)):
          for i in axis:
              x = torch.prod(x, i, keepdim=keepdims, dtype=dtype)
          return x
      return torch.prod(x, axis, keepdim=keepdims, dtype=dtype)
  
file_path: ivy/ivy/functional/backends/torch/statistical.py
imports: from typing import Union, Optional, Sequence
  import torch
  import ivy
  from ivy.functional.ivy.statistical import _get_promoted_type_of_operands
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from .None import backend_version
label_desc: Use image node_id 5 for calling a global function with example usage: prod() and returns: torch, x, torch, x