code: def mel_spec_example(set_device):
      # specify a value range of mel-spectrogram close to ones generated in practice. But we can also mock the values
      # by `torch.randn` for testing purpose.
      min_val = -11.0
      max_val = 0.5
      batch_size = 1
      n_mel_channels = 80
      n_frames = 330
      spec = (min_val - max_val) * torch.rand(
          batch_size, n_mel_channels, n_frames, device=set_device
      ) + max_val
      return spec
  
file_path: NeMo/tests/fixtures/tts.py
imports: import os
  import pytest
  import soundfile
  import torch
  from nemo.collections.asr.parts.utils.manifest_utils import read_manifest
label_desc: Use image node_id 5 for calling a global function with example usage: mel_spec_example(set_device) and returns: spec