code: def test_make_future_dataframe():
      """Checks future dataframe creation"""
      ts = UnivariateTimeSeries()
      df = pd.DataFrame(
          {
              TIME_COL: [
                  dt(2018, 1, 1, 3, 0, 0),
                  dt(2018, 1, 1, 4, 0, 0),
                  dt(2018, 1, 1, 5, 0, 0),
                  dt(2018, 1, 1, 6, 0, 0),
                  dt(2018, 1, 1, 7, 0, 0),
              ],
              VALUE_COL: [1, None, 3, None, None],
          }
      )
      with pytest.warns(UserWarning) as record:
          ts.load_data(df, TIME_COL, VALUE_COL, regressor_cols=None)
          assert (
              f"{ts.original_value_col} column of the provided time series contains "
              f"null values at the end, or the input `train_end_date` is beyond the last timestamp available. "
              f"Setting `train_end_date` to the last timestamp with a non-null value "
              f"({ts.train_end_date})." in record[0].message.args[0]
          )
  
      # test regressor_cols from load_data
      assert ts.regressor_cols == []
  
      # tests last_date_for_val from load_data
      assert ts.last_date_for_val == dt(2018, 1, 1, 5, 0, 0)
      assert ts.train_end_date == dt(2018, 1, 1, 5, 0, 0)
  
      # tests last_date_for_reg from load_data
      assert ts.last_date_for_reg is None
  
      # tests fit_df from load_data
      result_fit_df = ts.fit_df.reset_index(
          drop=True
      )  # fit_df's index is time_col
      expected_fit_df = df[df[TIME_COL] <= dt(2018, 1, 1, 5, 0, 0)]
      assert_frame_equal(result_fit_df, expected_fit_df)
  
      # tests fit_y
      result_fit_y = ts.fit_y.reset_index(
          drop=True
      )  # fit_y's index is time_col
      expected_fit_y = expected_fit_df[VALUE_COL]
      assert result_fit_y.equals(expected_fit_y)
  
      # with history, default value for periods
      result = ts.make_future_dataframe(
          periods=None, include_history=True
      )
      expected = pd.DataFrame(
          {
              TIME_COL: pd.date_range(
                  start=dt(2018, 1, 1, 3, 0, 0), periods=33, freq="H"
              ),
              VALUE_COL: np.concatenate(
                  (result_fit_y, np.repeat(np.nan, 30))
              ),
          }
      )
      expected.index = expected[TIME_COL]
      expected.index.name = None
      assert_frame_equal(result, expected)
  
      # without history
      result = ts.make_future_dataframe(
          periods=10, include_history=False
      )
      expected = pd.DataFrame(
          {
              TIME_COL: pd.date_range(
                  start=dt(2018, 1, 1, 6, 0, 0), periods=10, freq="H"
              ),
              VALUE_COL: np.repeat(np.nan, 10),
          }
      )
      expected.index = expected[TIME_COL]
      expected.index.name = None
      expected.index.freq = "H"
      assert_frame_equal(result, expected)
  
imports: import datetime
  from datetime import datetime
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  from greykite.common.constants import ADJUSTMENT_DELTA_COL
  from greykite.common.constants import END_TIME_COL
  from greykite.common.constants import METRIC_COL
  from greykite.common.constants import START_TIME_COL
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.common.time_properties import get_canonical_data
  from greykite.common.viz.timeseries_plotting import add_groupby_column
  from greykite.framework.benchmark.data_loader_ts import DataLoaderTS
  from greykite.framework.constants import MEAN_COL_GROUP
  from greykite.framework.constants import OVERLAY_COL_GROUP
  from greykite.framework.constants import QUANTILE_COL_GROUP
  from greykite.framework.input.univariate_time_series import UnivariateTimeSeries
label_desc: Use image node_id 7 for calling a global function with example usage: test_make_future_dataframe() without return types