code: def _stoi_original_batch(
      preds: Tensor, target: Tensor, fs: int, extended: bool
  ):
      # 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 = stoi_backend(
              target[b, ...], preds[b, ...], fs, extended
          )
          mss.append(pesq_val)
      return torch.tensor(mss)
  
imports: from functools import partial
  import pytest
  import torch
  from pystoi import stoi
  from scipy.io import wavfile
  from torch import Tensor
  from torchmetrics.audio import ShortTimeObjectiveIntelligibility
  from torchmetrics.functional.audio import short_time_objective_intelligibility
  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: _stoi_original_batch(preds, target, fs, extended) and returns: torch