code: def test_gcd_freq():
      # Checks warning for frequency not matching inferred frequency
      df = pd.DataFrame(
          {
              TIME_COL: [
                  datetime.datetime(2018, 1, 1, 0, 0, 0),
                  datetime.datetime(2018, 1, 2, 0, 0, 0),
                  datetime.datetime(2018, 1, 3, 0, 0, 0),
              ],
              VALUE_COL: [1, 2, 3],
          }
      )
      with pytest.warns(UserWarning) as record:
          canonical_data_dict = get_canonical_data(
              df=df, time_col=TIME_COL, value_col=VALUE_COL, freq="H"
          )
          assert (
              "does not match inferred frequency"
              in record[0].message.args[0]
          )
          assert (
              canonical_data_dict["time_stats"]["added_timepoints"]
              == 24 * 2 - 2
          )
          assert (
              canonical_data_dict["time_stats"]["dropped_timepoints"]
              == 0
          )
  
imports: import datetime
  import numpy
  import pandas
  import pytest
  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.data_loader import DataLoader
  from greykite.common.enums import TimeEnum
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.common.time_properties import describe_timeseries
  from greykite.common.time_properties import fill_missing_dates
  from greykite.common.time_properties import find_missing_dates
  from greykite.common.time_properties import get_canonical_data
  from greykite.common.time_properties import infer_freq
  from greykite.common.time_properties import min_gap_in_seconds
label_desc: Use image node_id 7 for calling a global function with example usage: test_gcd_freq() without return types