code: def convert_continuos_f0(f0):
      """CONVERT F0 TO CONTINUOUS F0
      Args:
          f0 (ndarray): original f0 sequence with the shape (T)
      Return:
          (ndarray): continuous f0 with the shape (T)
      """
      # get uv information as binary
      f0 = np.copy(f0)
      uv = np.float32(f0 != 0)
  
      # get start and end of f0
      if (f0 == 0).all():
          print("| all of the f0 values are 0.")
          return uv, f0
      start_f0 = f0[f0 != 0][0]
      end_f0 = f0[f0 != 0][-1]
  
      # padding start and end of f0 sequence
      start_idx = np.where(f0 == start_f0)[0][0]
      end_idx = np.where(f0 == end_f0)[0][-1]
      f0[:start_idx] = start_f0
      f0[end_idx:] = end_f0
  
      # get non-zero frame index
      nz_frames = np.where(f0 != 0)[0]
  
      # perform linear interpolation
      f = interp1d(nz_frames, f0[nz_frames])
      cont_f0 = f(np.arange(0, f0.shape[0]))
  
      return uv, cont_f0
  
file_path: PaddleHub/modules/audio/svs/diffsinger/utils/cwt.py
imports: import librosa
  import numpy
  from pycwt import wavelet
  from scipy.interpolate import interp1d
label_desc: Use image node_id 2 for calling a global function with example usage: convert_continuos_f0(f0) and returns: uv,  cont_f0, uv,  f0