code: def _irfft_input_to_complex(irfft_input, axis):
      """Convert the expected real input to :func:`scipy.fftpack.irfft` to
      the complex input needed by pyfftw.
      """
      complex_dtype = numpy.result_type(irfft_input, 1j)
  
      input_shape = list(irfft_input.shape)
      input_shape[axis] = input_shape[axis] // 2 + 1
  
      complex_input = numpy.empty(input_shape, dtype=complex_dtype)
      source_slicer = [slice(None)] * len(input_shape)
      target_slicer = [slice(None)] * len(input_shape)
  
      # First element
      source_slicer[axis] = slice(0, 1)
      target_slicer[axis] = slice(0, 1)
      complex_input[tuple(target_slicer)] = irfft_input[
          tuple(source_slicer)
      ]
  
      # Real part
      source_slicer[axis] = slice(1, None, 2)
      target_slicer[axis] = slice(1, None)
      complex_input[tuple(target_slicer)].real = irfft_input[
          tuple(source_slicer)
      ]
  
      # Imaginary part
      if irfft_input.shape[axis] % 2 == 0:
          end_val = -1
          target_slicer[axis] = slice(-1, None)
          complex_input[tuple(target_slicer)].imag = 0.0
      else:
          end_val = None
  
      source_slicer[axis] = slice(2, None, 2)
      target_slicer[axis] = slice(1, end_val)
      complex_input[tuple(target_slicer)].imag = irfft_input[
          tuple(source_slicer)
      ]
  
      return complex_input
  
imports: import itertools
  import math
  from numbers import Number
  import operator
  from .None import numpy_fft
  from ..builders._utils import _default_effort, _default_threads, _cook_nd_args
  from ._utils import _Xfftn
  import numpy
  from scipy.fftpack import diff, tilbert, itilbert, hilbert, ihilbert, cs_diff, sc_diff, ss_diff, cc_diff, shift, fftshift, ifftshift, fftfreq, rfftfreq, convolve
  from ..pyfftw import next_fast_len
label_desc: Use image node_id 11 for calling a global function with example usage: _irfft_input_to_complex(irfft_input, axis) and returns: complex_input