code: def test_impute_timeseries_dataframe(self):
      with pytest.raises(RuntimeError):
          impute_timeseries_dataframe(self.df, dt_col="z")
      with pytest.raises(RuntimeError):
          impute_timeseries_dataframe(
              self.df, dt_col="datetime", mode="dummy"
          )
      with pytest.raises(RuntimeError):
          impute_timeseries_dataframe(self.df, dt_col="a")
      last_res_df = impute_timeseries_dataframe(
          self.df, dt_col="datetime", mode="last"
      )
      assert self.df.isna().sum().sum() != 0
      assert last_res_df.isna().sum().sum() == 0
      const_res_df = impute_timeseries_dataframe(
          self.df, dt_col="datetime", mode="const"
      )
      assert self.df.isna().sum().sum() != 0
      assert const_res_df.isna().sum().sum() == 0
      linear_res_df = impute_timeseries_dataframe(
          self.df, dt_col="datetime", mode="linear"
      )
      assert self.df.isna().sum().sum() != 0
      assert linear_res_df.isna().sum().sum() == 0
  
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 3 for calling the TestImputeTimeSeries obj's underlying member method code with example usage: obj.test_impute_timeseries_dataframe() without return types