code: def get_f0_by_filename(filename, tgt_sampling_rate):
      audio, sampling_rate = load_wav(filename)
      if sampling_rate != tgt_sampling_rate:
          raise ValueError(
              "{} SR doesn't match target {} SR".format(
                  sampling_rate, tgt_sampling_rate
              )
          )
  
      # compute un-interpolated f0, and use Ann's interp in __getitem__ if set
      f0 = get_f0(audio, rate=tgt_sampling_rate)
      f0 = torch.from_numpy(f0.astype(np.float32))
      return f0
  
imports: import json
  import logging
  import os
  import random
  from pathlib import Path
  import numpy
  import torch
  import torch.utils.data
  from .None import data_utils
  from fairseq.data.fairseq_dataset import FairseqDataset
label_desc: Use image node_id 8 for calling a global function with example usage: get_f0_by_filename(filename, tgt_sampling_rate) and returns: f0