code: def test_linear_timeseries_dataframe(self):
      data = {
          "data": [np.nan, 1, np.nan, 2, 3],
          "datetime": pd.date_range("1/1/2019", periods=5),
      }
      df = pd.DataFrame(data)
      res_df = _linear_impute_timeseries_dataframe(
          df, dt_col="datetime"
      )
      assert res_df["data"][0] == 1
      assert res_df["data"][2] == 1.5
  
file_path: BigDL/python/chronos/test/bigdl/chronos/data/utils/test_impute.py
imports: import pytest
  import pandas
  import numpy
  from unittest import TestCase
  from bigdl.chronos.data.utils.impute import impute_timeseries_dataframe, _last_impute_timeseries_dataframe, _const_impute_timeseries_dataframe, _linear_impute_timeseries_dataframe
  from ...None import op_torch, op_tf2
label_desc: Use image node_id 6 for calling the TestImputeTimeSeries obj's underlying member method code with example usage: obj.test_linear_timeseries_dataframe() without return types