code: def fill_interpolation(df_in):
      np_arr = df_in.to_numpy()
      for ib in range(np_arr.shape[1]):
          n = len(np_arr)
          start, end = -1, 0
          while start < n - 1:
              if not np.isnan(np_arr[start + 1, ib]):
                  start += 1
                  end = start + 1
              elif end < n and np.isnan(np_arr[end, ib]):
                  end += 1
              else:
                  if start == -1:
                      np_arr[:end, ib] = np_arr[end, ib]
                  elif end == n:
                      np_arr[start + 1 :, ib] = np_arr[start, ib]
                  else:
                      for j in range(start + 1, end):
                          coef = (j - start) / (end - start)
                          np_arr[j, ib] = (1.0 - coef) * np_arr[
                              start, ib
                          ] + coef * np_arr[end, ib]
                  start = end
                  end = start + 1
      return pd.DataFrame(np_arr, columns=df_in.columns)
  
imports: from cuml.testing.utils import stress_param
  from cuml.internals.input_utils import input_to_host_array
  import cuml.tsa.arima
  from cuml.internals.safe_imports import gpu_only_import
  import statsmodels.api
  from sklearn.model_selection import train_test_split
  from cuml.internals.safe_imports import cpu_only_import_from
  import warnings
  import os
  import pytest
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 5 for calling a global function with example usage: fill_interpolation(df_in) and returns: pd