code: def save_pitch_contour(record):
      wav_path = record["wav_path"]
      wav_text_id = record["wav_id"]
      sup_data_dir = record["sup_data_dir"]
      stft_params = record["stft_params"]
      wav = load_wav(
          wav_path,
          stft_params["sample_rate"],
          stft_params["pad_multiple"],
      )
      pitch_contour_fn = f"pitch_contour_{wav_text_id}.pt"
      pitch_contour_fp = os.path.join(sup_data_dir, pitch_contour_fn)
  
      f0, _, _ = librosa.pyin(
          wav,
          fmin=librosa.note_to_hz("C2"),
          fmax=stft_params["yin_fmax"],
          frame_length=stft_params["win_length"],
          hop_length=stft_params["hop_length"],
          sr=stft_params["sample_rate"],
          center=True,
          fill_na=0.0,
      )
  
      pitch_contour = torch.tensor(f0, dtype=torch.float32)
      torch.save(pitch_contour, pitch_contour_fp)
      logging.info("saved {}".format(pitch_contour_fp))
  
      return pitch_contour
  
imports: import argparse
  import json
  import os
  import time
  from multiprocessing import Pool
  from pathlib import Path
  import hydra.utils
  import librosa
  import numpy
  import torch
  from omegaconf import open_dict
  from tqdm import tqdm
  from nemo.collections.asr.parts.preprocessing.segment import AudioSegment
  from nemo.collections.tts.models import ssl_tts
  from nemo.collections.tts.parts.utils.tts_dataset_utils import get_base_dir
  from nemo.core.classes import Dataset
  from nemo.utils import logging
label_desc: Use image node_id 5 for calling a global function with example usage: save_pitch_contour(record) and returns: pitch_contour