code: def interpolate_f0(f0):
      orig_t = np.arange(f0.shape[0])
      f0_interp = f0[:]
      ii = f0_interp != 0
      if ii.sum() > 1:
          f0_interp = interp1d(
              orig_t[ii],
              f0_interp[ii],
              bounds_error=False,
              kind="linear",
              fill_value=0,
          )(orig_t)
          # f0_interp = torch.Tensor(f0_interp).type_as(f0).to(f0.device)
      return f0_interp
  
file_path: textlesslib/textless/data/f0_preprocess.py
imports: import torch
  import amfm_decompy.basic_tools
  import amfm_decompy.pYAAPT
  from librosa.util import normalize
  import numpy
  from scipy.interpolate import interp1d
label_desc: Use image node_id 4 for calling a global function with example usage: interpolate_f0(f0) and returns: f0_interp