class_docstr: A wrapper around an audio metric enabling selection of a specific channel
  and handling of examples in a batch with varying valid input length.
  
  Note:
      This class assumes that the underlying metric uses averaging to calculate the
      value over a batch. This assumption is only used by `forward` and does not
      impact other methods, such as `update` and `compute`.
  
  Args:
      metric: base metric that should be wrapped. It is assumed that calculation
              of the metric over a batch is done by averaging.
      channel: Optional, for selecting a channel from `preds` and `target` signals.
               If None, all channels are used.
      metric_using_batch_averaging: Optional, used to denote that the base metric
                                    is using averaging to calculate the metric value
                                    for a batch.
class_docstr_tok: ["A","wrapper","around","an","audio","metric","enabling","selection","of","a","specific","channel","and","handling","of","examples","in","a","batch","with","varying","valid","input","length",".","Note",":","This","class","assumes","that","the","underlying","metric","uses","averaging","to","calculate","the","value","over","a","batch",".","This","assumption","is","only","used","by","`","forward","`","and","does","not","impact","other","methods",",","such","as","`","update","`","and","`","compute","`",".","Args",":","metric",":","base","metric","that","should","be","wrapped",".","It","is","assumed","that","calculation","of","the","metric","over","a","batch","is","done","by","averaging",".","channel",":","Optional",",","for","selecting","a","channel","from","`","preds","`","and","`","target","`","signals",".","If","None",",","all","channels","are","used",".","metric_using_batch_averaging",":","Optional",",","used","to","denote","that","the","base","metric","is","using","averaging","to","calculate","the","metric","value","for","a","batch","."]
code: def __init__(
      self,
      metric: Metric,
      channel: Optional[int] = None,
      metric_using_batch_averaging: Optional[bool] = None,
  ):
      super().__init__()
      if not isinstance(metric, Metric):
          raise ValueError(
              f"Expected argument `metric` to be an instance of `torchmetrics.Metric` but got {metric}"
          )
  
      if (
          not metric_using_batch_averaging
          and type(metric) not in __VERIFIED_METRICS__
      ):
          raise ValueError(
              f"Metric {metric} is not in verified metrics. {self.__class__.__name__} assumes reduction over batch is calculated using averaging. \n"
              "This should not affect the final results, but values for a single batch obtained using `forward` may be inaccurate if using `input_length`. \n"
              'To suppress this message, please confirm the used metric is using batch averaging and set "metric_using_batch_averaging = True"'
          )
  
      self._metric = metric
      self._channel = channel
      logging.debug("Setup metric %s, channel %s", metric, str(channel))
  
imports: from typing import Callable, Iterable, List, Optional, Tuple
  import torch
  from torchmetrics import Metric
  from torchmetrics.audio.pesq import PerceptualEvaluationSpeechQuality
  from torchmetrics.audio.pit import PermutationInvariantTraining
  from torchmetrics.audio.sdr import ScaleInvariantSignalDistortionRatio, SignalDistortionRatio
  from torchmetrics.audio.snr import ScaleInvariantSignalNoiseRatio, SignalNoiseRatio
  from torchmetrics.audio.stoi import ShortTimeObjectiveIntelligibility
  from nemo.utils import logging
label_desc: Use image node_id 1 to create a new AudioMetricWrapper object from inherited base classes: Metric with example: obj = AudioMetricWrapper(metric, channel, metric_using_batch_averaging)