code: def _index_or_values_interpolation(column, index=None):
      """
      Interpolate over a float column. assumes a linear interpolation
      strategy using the index of the data to denote spacing of the x
      values. For example the data and index [1.0, NaN, 4.0], [1, 3, 4]
      would result in [1.0, 3.0, 4.0]
      """
      # figure out where the nans are
      mask = cp.isnan(column)
  
      # trivial cases, all nan or no nans
      num_nan = mask.sum()
      if num_nan == 0 or num_nan == len(column):
          return column
  
      to_interp = IndexedFrame(data={None: column}, index=index)
      known_x_and_y = to_interp._apply_boolean_mask(
          BooleanMask(~mask, len(to_interp))
      )
  
      known_x = known_x_and_y._index._column.values
      known_y = known_x_and_y._data.columns[0].values
  
      result = cp.interp(to_interp._index.values, known_x, known_y)
  
      # find the first nan
      first_nan_idx = (mask == 0).argmax().item()
      result[:first_nan_idx] = np.nan
      return result
  
file_path: cudf/python/cudf/cudf/core/algorithms.py
imports: import warnings
  import cupy
  import numpy
  from cudf.core.column import as_column
  from cudf.core.copy_types import BooleanMask
  from cudf.core.index import RangeIndex, as_index
  from cudf.core.indexed_frame import IndexedFrame
  from cudf.core.scalar import Scalar
  from cudf.options import get_option
  from cudf.utils.dtypes import can_convert_to_column
label_desc: Use image node_id 3 for calling a global function with example usage: _index_or_values_interpolation(column, index) and returns: result, column