class_docstr: This module implements the filter function for audio signals in PyTorch. It provides with an infinite impulse
  response (IIR) or finite impulse response (FIR) filter. This implementation is a wrapper around the
  `torchaudio.functional.lfilter` function in the `torchaudio` package.
docstr: Apply filter to sample `x`.
  
  :param x: Samples of shape (nb_samples, seq_length). Note that, it is allowable that sequences in the batch
            could have different lengths. A possible example of `x` could be:
            `x = np.array([np.array([0.1, 0.2, 0.1, 0.4]), np.array([0.3, 0.1])])`.
  :param y: Labels of the sample `x`. This function does not affect them in any way.
  :return: Similar samples.
code: def __call__(
      self, x: np.ndarray, y: Optional[np.ndarray] = None
  ) -> Tuple[np.ndarray, Optional[np.ndarray]]:
      """
      Apply filter to sample `x`.
  
      :param x: Samples of shape (nb_samples, seq_length). Note that, it is allowable that sequences in the batch
                could have different lengths. A possible example of `x` could be:
                `x = np.array([np.array([0.1, 0.2, 0.1, 0.4]), np.array([0.3, 0.1])])`.
      :param y: Labels of the sample `x`. This function does not affect them in any way.
      :return: Similar samples.
      """
      import torch
  
      x_preprocess = x.copy()
  
      # Filter one input at a time
      for i, x_preprocess_i in enumerate(
          tqdm(
              x_preprocess,
              desc="Apply audio filter",
              disable=not self.verbose,
          )
      ):
          if (
              np.min(x_preprocess_i) < -1.0
              or np.max(x_preprocess_i) > 1.0
          ):  # pragma: no cover
              raise ValueError(
                  "Audio signals must be normalized to the range `[-1.0, 1.0]` to apply the audio filter function."
              )
  
          x_preprocess_i = torch.tensor(
              x_preprocess_i, device=self._device
          )
  
          with torch.no_grad():
              x_preprocess_i, _ = self.forward(x_preprocess_i)
  
          x_preprocess[i] = x_preprocess_i.cpu().numpy()
  
      return x_preprocess, y
  
file_path: adversarial-robustness-toolbox/art/preprocessing/audio/l_filter/pytorch.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, Tuple, TYPE_CHECKING
  import numpy
  from tqdm.auto import tqdm
  from art.preprocessing.preprocessing import PreprocessorPyTorch
label_desc: Use image node_id 3 for calling the LFilterPyTorch obj's underlying member method code with example usage: obj.__call__(x, y) and returns: x_preprocess,  y