code: def _pesq_original_batch(
      preds: Tensor, target: Tensor, fs: int, mode: str
  ):
      """Comparison function."""
      # shape: preds [BATCH_SIZE, Time] , target [BATCH_SIZE, Time]
      # or shape: preds [NUM_BATCHES*BATCH_SIZE, Time] , target [NUM_BATCHES*BATCH_SIZE, Time]
      target = target.detach().cpu().numpy()
      preds = preds.detach().cpu().numpy()
      mss = []
      for b in range(preds.shape[0]):
          pesq_val = pesq_backend(
              fs, target[b, ...], preds[b, ...], mode
          )
          mss.append(pesq_val)
      return torch.tensor(mss)
  
imports: from functools import partial
  import pytest
  import torch
  from pesq import pesq
  from scipy.io import wavfile
  from torch import Tensor
  from torchmetrics.audio import PerceptualEvaluationSpeechQuality
  from torchmetrics.functional.audio import perceptual_evaluation_speech_quality
  from unittests import _Input
  from unittests.audio import _SAMPLE_AUDIO_SPEECH, _SAMPLE_AUDIO_SPEECH_BAB_DB
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 1 for calling a global function with example usage: _pesq_original_batch(preds, target, fs, mode) and returns: torch