code: def _init_freq_conv_axes(in1, in2, mode, axes, sorted_axes=False):
      """Handle the axes argument for frequency-domain convolution.
  
      Returns the inputs and axes in a standard form, eliminating redundant axes,
      swapping the inputs if necessary, and checking for various potential
      errors.
  
      Parameters
      ----------
      in1 : array
          First input.
      in2 : array
          Second input.
      mode : str {'full', 'valid', 'same'}, optional
          A string indicating the size of the output.
          See the documentation `fftconvolve` for more information.
      axes : list of ints
          Axes over which to compute the FFTs.
      sorted_axes : bool, optional
          If `True`, sort the axes.
          Default is `False`, do not sort.
  
      Returns
      -------
      in1 : array
          The first input, possible swapped with the second input.
      in2 : array
          The second input, possible swapped with the first input.
      axes : list of ints
          Axes over which to compute the FFTs.
  
      """
      s1 = in1.shape
      s2 = in2.shape
      noaxes = axes is None
  
      _, axes = _init_nd_shape_and_axes(in1, shape=None, axes=axes)
  
      if not noaxes and not len(axes):
          raise ValueError("when provided, axes cannot be empty")
  
      # Axes of length 1 can rely on broadcasting rules for multipy,
      # no fft needed.
      axes = [a for a in axes if s1[a] != 1 and s2[a] != 1]
  
      if sorted_axes:
          axes.sort()
  
      if not all(
          s1[a] == s2[a] or s1[a] == 1 or s2[a] == 1
          for a in range(in1.ndim)
          if a not in axes
      ):
          raise ValueError(
              "incompatible shapes for in1 and in2:"
              " {0} and {1}".format(s1, s2)
          )
  
      # Check that input sizes are compatible with 'valid' mode.
      if _inputs_swap_needed(mode, s1, s2, axes=axes):
          # Convolution is commutative; order doesn't have any effect on output.
          in1, in2 = in2, in1
  
      return in1, in2, axes
  
imports: import operator
  import math
  import timeit
  from scipy.spatial import cKDTree
  from .None import sigtools, dlti
  from ._upfirdn import upfirdn, _output_len, _upfirdn_modes
  from scipy import linalg, fft
  from scipy.fft._helper import _init_nd_shape_and_axes
  from scipy._lib._util import prod
  import numpy
  from scipy.special import lambertw
  from .windows import get_window
  from ._arraytools import axis_slice, axis_reverse, odd_ext, even_ext, const_ext
  from .filter_design import cheby1, _validate_sos
  from .fir_filter_design import firwin
  from ._sosfilt import _sosfilt
  import warnings
label_desc: Use image node_id 7 for calling a global function with example usage: _init_freq_conv_axes(in1, in2, mode, axes, sorted_axes) and returns: in1,  in2,  axes