code: def _rfft_1d(
      input_real: Var,
      n: Optional[Var],
      dim: Optional[Var],
      norm: Optional[Var],
      before_op: Operation,
  ) -> Tuple[Var, Var]:
      """
      It's similar to fft, but as the input is real data, the redundant info (the conjugate part) is
      removed in the result.
      """
      input_imag = mb.fill(
          shape=mb.shape(x=input_real, before_op=before_op),
          value=0.0,
          before_op=before_op,
      )
      real_data, imag_data = _fft_1d(
          input_real, input_imag, n, dim, norm, before_op=before_op
      )
      remain_len = real_data.shape[dim.val] // 2 + 1
      remain_indices = mb.range_1d(
          start=0, end=remain_len, step=1, before_op=before_op
      )
      real_data = mb.gather(
          x=real_data,
          indices=remain_indices,
          axis=dim.val,
          before_op=before_op,
      )
      imag_data = mb.gather(
          x=imag_data,
          indices=remain_indices,
          axis=dim.val,
          before_op=before_op,
      )
  
      return real_data, imag_data
  
imports: import functools
  from typing import Callable, Dict, Optional, Tuple
  import numpy
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.operation import Operation
  from coremltools.converters.mil.mil.ops.defs.complex_dialect_ops import fft_canonicalize_length_dim, fft_canonicalize_shapes_dims
  from coremltools.converters.mil.mil.passes.graph_pass import AbstractGraphPass
  from coremltools.converters.mil.mil.passes.helper import block_context_manager
  from coremltools.converters.mil.mil.passes.pass_registry import register_pass
  from coremltools.converters.mil.mil.var import ComplexVar, Var
label_desc: Use image node_id 5 for calling a global function with example usage: _rfft_1d(input_real, n, dim, norm, before_op) and returns: real_data,  imag_data