code: def torch_frame_splicing(
      mel_spec, stacking=1, subsampling=1, device="cpu"
  ):
      mel_spec = torch.tensor(mel_spec, dtype=torch.float32).unsqueeze(
          0
      )
      if device == "gpu":
          mel_spec = mel_spec.cuda()
      out = stack_subsample_frames(
          mel_spec, stacking=stacking, subsampling=subsampling
      )
      out = out.cpu().numpy().squeeze(0)
      return out
  
imports: import nose_utils
  import nvidia.dali.fn
  from nvidia.dali import pipeline_def
  import nvidia.dali.types
  from test_utils import get_files, to_array
  import numpy
  import librosa
  import torch
  import math
  import random
  import os
  from nose.tools import nottest
label_desc: Use image node_id 10 for calling a global function with example usage: torch_frame_splicing(mel_spec, stacking, subsampling, device) and returns: out