code: def extract_pitch(signal, sampling_rate, block_size):
      length = signal.shape[-1] // block_size
      f0 = crepe.predict(
          signal,
          sampling_rate,
          step_size=int(1000 * block_size / sampling_rate),
          verbose=1,
          center=True,
          viterbi=True,
      )
      f0 = f0[1].reshape(-1)[:-1]
  
      if f0.shape[-1] != length:
          f0 = np.interp(
              np.linspace(0, 1, length, endpoint=False),
              np.linspace(0, 1, f0.shape[-1], endpoint=False),
              f0,
          )
  
      return f0
  
imports: import math
  import librosa
  import numpy
  import torch
  import torch.fft
  import torch.nn
  from scipy.signal import get_window
label_desc: Use image node_id 9 for calling a global function with example usage: extract_pitch(signal, sampling_rate, block_size) and returns: f0