code: def main(
      file_path,
      f0_dir,
      out_dir,
      out_prefix,
      nbins,
      nshards,
      normalize,
      log,
  ):
      audio_paths = load_audio_path(file_path)
      path_to_f0 = load_f0(f0_dir, nshards)
  
      speakers = load_speaker(file_path)
      speaker_to_f0 = defaultdict(partial(F0Stat, True))
  
      # speaker f0 stats
      for audio_path, speaker in tqdm(zip(audio_paths, speakers)):
          f0 = path_to_f0[audio_path]
          speaker_to_f0[speaker].update(f0)
      f0_stats = dump_speaker_f0_stat(
          speaker_to_f0, f"{out_dir}/{out_prefix}"
      )
  
      # quantize
      f0_bin = quantize_f0(
          speaker_to_f0, f0_stats, nbins, normalize, log
      )
      log_suffix = "_log" if log else ""
      f0_bin_out_file = f"{out_dir}/{out_prefix}_{normalize}_norm{log_suffix}_f0_bin.th"
      torch.save(f0_bin, f0_bin_out_file)
  
file_path: fairseq/examples/textless_nlp/pgslm/quantize_f0.py
imports: from collections import defaultdict
  from functools import partial
  import numpy
  import torch
  from tqdm import tqdm
  from data_utils import dump_speaker_f0_stat, F0Stat, load_audio_path, load_f0
label_desc: Use image node_id 3 for calling a global function with example usage: main(file_path, f0_dir, out_dir, out_prefix, nbins, nshards, normalize, log) without return types