code: def test_xshardstsdataset_impute(self):
      from tempfile import TemporaryDirectory
  
      tmp_df = get_ugly_ts_df()
      with TemporaryDirectory() as tmpdir:
          file_name = os.path.join(tmpdir, "impute.csv")
          tmp_df.to_csv(file_name, index=False)
          shards_tmp = read_csv(file_name)
  
          for val in ["last", "const", "linear"]:
              tsdata = XShardsTSDataset.from_xshards(
                  shards_tmp,
                  dt_col="datetime",
                  target_col="e",
                  extra_feature_col=["a", "b", "c", "d"],
                  id_col="id",
              )
              tsdata.impute(mode=val)
              collected_df = tsdata.shards.collect()
              collected_df = pd.concat(collected_df, axis=0)
  
              assert collected_df.isna().sum().sum() == 0
              assert len(collected_df) == 100
  
imports: import pytest
  import numpy
  import pandas
  import random
  import os
  from unittest import TestCase
  from bigdl.chronos.data import TSDataset
  from bigdl.chronos.utils import LazyImport
  from ...None import op_torch, op_distributed
  from pandas.testing import assert_frame_equal
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 11 for calling the TestXShardsTSDataset obj's underlying member method code with example usage: obj.test_xshardstsdataset_impute() without return types