code: def ifft(
      x: np.ndarray,
      dim: int,
      *,
      norm: str = "backward",
      n: Optional[Union[int, Tuple[int]]] = None,
      out: Optional[np.ndarray] = None,
  ) -> np.ndarray:
      if not isinstance(dim, int):
          raise ivy.utils.exceptions.IvyError(
              f"Expecting <class 'int'> instead of {type(dim)}"
          )
      if n is None:
          n = x.shape[dim]
      if n < -len(x.shape):
          raise ivy.utils.exceptions.IvyError(
              f"Invalid dim {dim}, expecting ranging"
              " from {-len(x.shape)} to {len(x.shape)-1}  "
          )
      if not isinstance(n, int):
          raise ivy.utils.exceptions.IvyError(
              f"Expecting <class 'int'> instead of {type(n)}"
          )
      if n <= 1:
          raise ivy.utils.exceptions.IvyError(
              f"Invalid data points {n}, expecting more than 1"
          )
      if norm not in {"backward", "ortho", "forward"}:
          raise ivy.utils.exceptions.IvyError(
              f"Unrecognized normalization mode {norm}"
          )
      return np.asarray(np.fft.ifft(x, n, dim, norm), dtype=x.dtype)
  
imports: import math
  import numpy
  from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
  import ivy
  from ivy.functional.ivy.layers import _handle_padding, _get_num_padded_values, _validate_max_pool_params, _depth_max_pooling_helper
  from ivy.functional.backends.numpy.layers import _add_dilations
  from ivy.functional.ivy.experimental.layers import _padding_ceil_mode
  from ivy.func_wrapper import with_supported_dtypes
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
label_desc: Use image node_id 15 for calling a global function with example usage: ifft(x, dim) and returns: np