code: def test_impute_range(self):
      def get_df():
          return pd.DataFrame(
              np.transpose(
                  [
                      [0, 1, 2, np.NaN],
                      [1, np.PINF, 2, 3],
                      [1, -3, np.NINF, 3],
                  ]
              ),
              columns=["value_a", "value_b", "value_c"],
          )
  
      # check if values are replaced correctly
      df = get_df()
      col_to_max = {"value_a": 200, "value_b": 200, "value_c": 200}
      col_to_min = {"value_a": -134, "value_b": -134, "value_c": -134}
      col_to_median = {"value_a": 55, "value_b": 55, "value_c": 55}
      dataframe_functions.impute_dataframe_range(
          df, col_to_max, col_to_min, col_to_median
      )
      self.assertEqual(list(df.value_a), [0, 1, 2, 55])
      self.assertEqual(list(df.value_b), [1, 200, 2, 3])
      self.assertEqual(list(df.value_c), [1, -3, -134, 3])
  
      # check for error if column key is missing
      df = get_df()
      col_to_max = {"value_a": 200, "value_b": 200, "value_c": 200}
      col_to_min = {"value_a": -134, "value_b": -134, "value_c": -134}
      col_to_median = {"value_a": 55, "value_c": 55}
      self.assertRaises(
          ValueError,
          dataframe_functions.impute_dataframe_range,
          df,
          col_to_max,
          col_to_min,
          col_to_median,
      )
  
      # check for no error if column key is too much
      col_to_max = {"value_a": 200, "value_b": 200, "value_c": 200}
      col_to_min = {"value_a": -134, "value_b": -134, "value_c": -134}
      col_to_median = {
          "value_a": 55,
          "value_b": 55,
          "value_c": 55,
          "value_d": 55,
      }
      dataframe_functions.impute_dataframe_range(
          df, col_to_max, col_to_min, col_to_median
      )
  
      # check for error if replacement value is not finite
      df = get_df()
      col_to_max = {"value_a": 200, "value_b": np.NaN, "value_c": 200}
      col_to_min = {"value_a": -134, "value_b": -134, "value_c": -134}
      col_to_median = {"value_a": 55, "value_b": 55, "value_c": 55}
      self.assertRaises(
          ValueError,
          dataframe_functions.impute_dataframe_range,
          df,
          col_to_max,
          col_to_min,
          col_to_median,
      )
      df = get_df()
      col_to_max = {"value_a": 200, "value_b": 200, "value_c": 200}
      col_to_min = {
          "value_a": -134,
          "value_b": np.NINF,
          "value_c": -134,
      }
      col_to_median = {"value_a": 55, "value_b": 55, "value_c": 55}
      self.assertRaises(
          ValueError,
          dataframe_functions.impute_dataframe_range,
          df,
          col_to_max,
          col_to_min,
          col_to_median,
      )
  
      df = get_df()
      col_to_max = {"value_a": 200, "value_b": 200, "value_c": 200}
      col_to_min = {"value_a": -134, "value_b": -134, "value_c": -134}
      col_to_median = {"value_a": 55, "value_b": 55, "value_c": np.PINF}
      self.assertRaises(
          ValueError,
          dataframe_functions.impute_dataframe_range,
          df,
          col_to_max,
          col_to_min,
          col_to_median,
      )
  
      df = pd.DataFrame([0, 1, 2, 3, 4], columns=["test"])
      col_dict = {"test": 0}
      dataframe_functions.impute_dataframe_range(
          df, col_dict, col_dict, col_dict
      )
  
      self.assertEqual(df.columns, ["test"])
      self.assertListEqual(list(df["test"].values), [0, 1, 2, 3, 4])
  
      df = pd.DataFrame([])
      dataframe_functions.impute_dataframe_range(df, {}, {}, {})
  
      self.assertEqual(len(df), 0)
  
imports: import warnings
  from unittest import TestCase
  import numpy
  import pandas
  from pandas.testing import assert_frame_equal, assert_series_equal
  from tests.fixtures import warning_free
  from tsfresh import extract_relevant_features
  from tsfresh.feature_extraction.settings import MinimalFCParameters
  from tsfresh.utilities import dataframe_functions
label_desc: Use image node_id 3 for calling the ImputeTestCase obj's underlying member method code with example usage: obj.test_impute_range() and returns: pd