code: def lfilter(
      waveform: Tensor,
      a_coeffs: Tensor,
      b_coeffs: Tensor,
      clamp: bool = True,
      batching: bool = True,
  ) -> Tensor:
      r"""Perform an IIR filter by evaluating difference equation.
  
      .. devices:: CPU CUDA
  
      .. properties:: Autograd TorchScript
  
      Note:
          To avoid numerical problems, small filter order is preferred.
          Using double precision could also minimize numerical precision errors.
  
      Args:
          waveform (Tensor): audio waveform of dimension of `(..., time)`.  Must be normalized to -1 to 1.
          a_coeffs (Tensor): denominator coefficients of difference equation of dimension of either
                                  1D with shape `(num_order + 1)` or 2D with shape `(num_filters, num_order + 1)`.
                                  Lower delays coefficients are first, e.g. ``[a0, a1, a2, ...]``.
                                  Must be same size as b_coeffs (pad with 0's as necessary).
          b_coeffs (Tensor): numerator coefficients of difference equation of dimension of either
                                  1D with shape `(num_order + 1)` or 2D with shape `(num_filters, num_order + 1)`.
                                  Lower delays coefficients are first, e.g. ``[b0, b1, b2, ...]``.
                                  Must be same size as a_coeffs (pad with 0's as necessary).
          clamp (bool, optional): If ``True``, clamp the output signal to be in the range [-1, 1] (Default: ``True``)
          batching (bool, optional): Effective only when coefficients are 2D. If ``True``, then waveform should be at
                                      least 2D, and the size of second axis from last should equals to ``num_filters``.
                                      The output can be expressed as ``output[..., i, :] = lfilter(waveform[..., i, :],
                                      a_coeffs[i], b_coeffs[i], clamp=clamp, batching=False)``. (Default: ``True``)
  
      Returns:
          Tensor: Waveform with dimension of either `(..., num_filters, time)` if ``a_coeffs`` and ``b_coeffs``
          are 2D Tensors, or `(..., time)` otherwise.
      """
      if a_coeffs.size() != b_coeffs.size():
          raise ValueError(
              "Expected coeffs to be the same size."
              f"Found: a_coeffs size: {a_coeffs.size()}, b_coeffs size: {b_coeffs.size()}"
          )
      if a_coeffs.ndim > 2:
          raise ValueError(
              f"Expected coeffs to have greater than 1 dimension. Found: {a_coeffs.ndim}"
          )
  
      if a_coeffs.ndim > 1:
          if batching:
              if waveform.ndim <= 0:
                  raise ValueError(
                      "Expected waveform to have a positive number of dimensions."
                      f"Found: {waveform.ndim}"
                  )
              if waveform.shape[-2] != a_coeffs.shape[0]:
                  raise ValueError(
                      "Expected number of batches in waveform and coeffs to be the same."
                      f"Found: coeffs batches: {a_coeffs.shape[0]}, waveform batches: {waveform.shape[-2]}"
                  )
          else:
              waveform = torch.stack([waveform] * a_coeffs.shape[0], -2)
      else:
          a_coeffs = a_coeffs.unsqueeze(0)
          b_coeffs = b_coeffs.unsqueeze(0)
  
      # pack batch
      shape = waveform.size()
      waveform = waveform.reshape(-1, a_coeffs.shape[0], shape[-1])
      output = _lfilter(waveform, a_coeffs, b_coeffs)
  
      if clamp:
          output = torch.clamp(output, min=-1.0, max=1.0)
  
      # unpack batch
      output = output.reshape(shape[:-1] + output.shape[-1:])
  
      return output
  
imports: import math
  import warnings
  from typing import Optional
  import torch
  from torch import Tensor
  from torchaudio._extension import _IS_TORCHAUDIO_EXT_AVAILABLE
label_desc: Use image node_id 22 for calling a global function with example usage: lfilter(waveform, a_coeffs, b_coeffs, clamp, batching) and returns: output