code: def _iir_filter(x, iir_params, picks, n_jobs, copy, phase="zero"):
      """Call filtfilt or lfilter."""
      # set up array for filtering, reshape to 2D, operate on last axis
      x, orig_shape, picks = _prep_for_filtering(x, copy, picks)
      if phase in ("zero", "zero-double"):
          padlen = min(iir_params["padlen"], x.shape[-1] - 1)
          if "sos" in iir_params:
              fun = partial(
                  signal.sosfiltfilt,
                  sos=iir_params["sos"],
                  padlen=padlen,
                  axis=-1,
              )
              _check_coefficients(iir_params["sos"])
          else:
              fun = partial(
                  signal.filtfilt,
                  b=iir_params["b"],
                  a=iir_params["a"],
                  padlen=padlen,
                  axis=-1,
              )
              _check_coefficients((iir_params["b"], iir_params["a"]))
      else:
          if "sos" in iir_params:
              fun = partial(
                  signal.sosfilt, sos=iir_params["sos"], axis=-1
              )
              _check_coefficients(iir_params["sos"])
          else:
              fun = partial(
                  signal.lfilter,
                  b=iir_params["b"],
                  a=iir_params["a"],
                  axis=-1,
              )
              _check_coefficients((iir_params["b"], iir_params["a"]))
      parallel, p_fun, n_jobs = parallel_func(fun, n_jobs)
      if n_jobs == 1:
          for p in picks:
              x[p] = fun(x=x[p])
      else:
          data_new = parallel(p_fun(x=x[p]) for p in picks)
          for pp, p in enumerate(picks):
              x[p] = data_new[pp]
      x.shape = orig_shape
      return x
  
imports: from collections import Counter
  from copy import deepcopy
  from functools import partial
  from math import gcd
  import numpy
  from scipy import fft, signal
  from scipy.stats import f
  from ._fiff.pick import _picks_to_idx
  from ._ola import _COLA
  from .cuda import _fft_multiply_repeated, _fft_resample, _setup_cuda_fft_multiply_repeated, _setup_cuda_fft_resample, _smart_pad
  from .parallel import parallel_func
  from .utils import _check_option, _check_preload, _ensure_int, _pl, _validate_type, logger, sum_squared, verbose, warn
label_desc: Use image node_id 11 for calling a global function with example usage: _iir_filter(x, iir_params, picks, n_jobs, copy, phase) and returns: x