code: def test_get_forecast_time_properties(df):
      mt = MyTemplate()
      mt.df = df
  
      # with `train_end_date` (masking applied)
      mt.config = ForecastConfig(
          coverage=0.9,
          forecast_horizon=20,
          metadata_param=MetadataParam(
              time_col=NEW_TIME_COL,
              value_col=NEW_VALUE_COL,
              freq="H",
              date_format="%Y-%m-%d-%H",
              train_end_date=datetime.datetime(2019, 2, 1),
          ),
      )
      mt.regressor_cols = mt.get_regressor_cols()
      mt.lagged_regressor_cols = mt.get_lagged_regressor_info()[
          "lagged_regressor_cols"
      ]
      time_properties = mt.get_forecast_time_properties()
  
      period = 3600  # seconds between observations
      time_delta = (
          mt.config.metadata_param.train_end_date
          - df[mt.config.metadata_param.time_col].min()
      )  # train end - train start
      num_training_days = (
          time_delta.days
          + (time_delta.seconds + period)
          / TimeEnum.ONE_DAY_IN_SECONDS.value
      )
      assert time_properties["num_training_days"] == num_training_days
  
      # without `train_end_date`
      mt.config.metadata_param.train_end_date = None
      time_properties = mt.get_forecast_time_properties()
      time_delta = (
          datetime.datetime(2019, 2, 26)
          - df[mt.config.metadata_param.time_col].min()
      )  # by default, train end is the last date with nonnull value_col
      num_training_days = (
          time_delta.days
          + (time_delta.seconds + period)
          / TimeEnum.ONE_DAY_IN_SECONDS.value
      )
      assert time_properties["num_training_days"] == num_training_days
  
imports: import dataclasses
  import datetime
  import pytest
  import sklearn
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.enums import TimeEnum
  from greykite.common.evaluation import EvaluationMetricEnum
  from greykite.common.python_utils import assert_equal
  from greykite.common.python_utils import unique_elements_in_list
  from greykite.common.testing_utils import assert_eval_function_equal
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.framework.templates.autogen.forecast_config import EvaluationMetricParam
  from greykite.framework.templates.autogen.forecast_config import EvaluationPeriodParam
  from greykite.framework.templates.autogen.forecast_config import ForecastConfig
  from greykite.framework.templates.autogen.forecast_config import MetadataParam
  from greykite.framework.templates.base_template import BaseTemplate
  from greykite.sklearn.estimator.silverkite_estimator import SilverkiteEstimator
label_desc: Use image node_id 6 for calling a global function with example usage: test_get_forecast_time_properties(df) without return types