code: def _check_method(method, iir_params, extra_types=()):
      """Parse method arguments."""
      allowed_types = ["iir", "fir", "fft"] + list(extra_types)
      _validate_type(method, "str", "method")
      _check_option("method", method, allowed_types)
      if method == "fft":
          method = "fir"  # use the better name
      if method == "iir":
          if iir_params is None:
              iir_params = dict()
          if len(iir_params) == 0 or (
              len(iir_params) == 1 and "output" in iir_params
          ):
              iir_params = dict(
                  order=4,
                  ftype="butter",
                  output=iir_params.get("output", "sos"),
              )
      elif iir_params is not None:
          raise ValueError('iir_params must be None if method != "iir"')
      return iir_params, method
  
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 14 for calling a global function with example usage: _check_method(method, iir_params, extra_types) and returns: iir_params,  method