code: def rfftn(
      x: np.ndarray,
      s: Optional[Sequence[int]] = None,
      axes: Optional[Sequence[int]] = None,
      *,
      norm: str = "backward",
      out: Optional[np.ndarray] = None,
  ) -> np.ndarray:
      if not all(isinstance(j, int) for j in axes):
          raise ivy.utils.exceptions.IvyError(
              f"Expecting {axes} to be a sequence of integers <class integer>"
          )
      if s is None:
          s = (x.shape[axes[0]], x.shape[axes[1]])
      if all(j < -len(x.shape) for j in s):
          raise ivy.utils.exceptions.IvyError(
              f"Invalid dim {axes}, expecting ranging"
              f" from {-len(x.shape)} to {len(x.shape)-1}  "
          )
      if not all(isinstance(j, int) for j in s):
          raise ivy.utils.exceptions.IvyError(
              f"Expecting {s} to be a sequence of integers <class integer>"
          )
      if all(j <= 1 for j in s):
          raise ivy.utils.exceptions.IvyError(
              f"Invalid data points {s}, expecting s points larger than 1"
          )
      if norm not in {"backward", "ortho", "forward"}:
          raise ivy.utils.exceptions.IvyError(
              f"Unrecognized normalization mode {norm}"
          )
      return np.fft.rfftn(x, s, axes, norm).astype(np.complex128)
  
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 20 for calling a global function with example usage: rfftn(x, s, axes) and returns: np