code: def test_gcd_dates():
      """Checks if regular data can be properly loaded. Checks time column stats"""
      df = pd.DataFrame(
          {
              "time": [
                  datetime.datetime(2018, 1, 1, 0, 0, 1),
                  datetime.datetime(2018, 1, 1, 0, 0, 2),
                  datetime.datetime(2018, 1, 1, 0, 0, 3),
              ],
              "val": [1, 2, 3],
          }
      )
      canonical_data_dict = get_canonical_data(
          df=df, time_col="time", value_col="val"
      )
      assert_equal(
          canonical_data_dict["time_stats"]["gaps"],
          find_missing_dates(df["time"]),
      )
      assert canonical_data_dict["time_stats"]["added_timepoints"] == 0
      assert (
          canonical_data_dict["time_stats"]["dropped_timepoints"] == 0
      )
      assert canonical_data_dict["freq"] == "S"
      assert_equal(
          canonical_data_dict["df"][VALUE_COL].values, df["val"].values
      )
      assert canonical_data_dict["df"].index.name is None
  
      # string with date format
      date_format = "%Y-%m-%d"
      df = pd.DataFrame(
          {
              TIME_COL: ["2018-01-01", "2018-01-05", "2018-01-09"],
              VALUE_COL: [1, 2, 3],
          }
      )
      canonical_data_dict = get_canonical_data(
          df=df,
          time_col=TIME_COL,
          value_col=VALUE_COL,
          date_format=date_format,
          freq="4D",
      )
      expected = pd.DataFrame(
          {
              TIME_COL: pd.Series(
                  [
                      datetime.datetime(2018, 1, 1, 0, 0, 0),
                      datetime.datetime(2018, 1, 5, 0, 0, 0),
                      datetime.datetime(2018, 1, 9, 0, 0, 0),
                  ],
                  name=TIME_COL,
              ),
              VALUE_COL: df[VALUE_COL],
          }
      )
      expected.index = expected[TIME_COL]
      expected.index.name = None
      assert canonical_data_dict["time_stats"]["added_timepoints"] == 0
      assert (
          canonical_data_dict["time_stats"]["dropped_timepoints"] == 0
      )
      assert canonical_data_dict["freq"] == "4D"
      assert_equal(canonical_data_dict["df"], expected)
  
      # string with inferred date format
      canonical_data_dict = get_canonical_data(
          df=df, time_col=TIME_COL, value_col=VALUE_COL, freq="4D"
      )
      assert canonical_data_dict["time_stats"]["added_timepoints"] == 0
      assert (
          canonical_data_dict["time_stats"]["dropped_timepoints"] == 0
      )
      assert_equal(canonical_data_dict["df"], expected)
  
      # time zone
      canonical_data_dict = get_canonical_data(
          df=df,
          time_col=TIME_COL,
          value_col=VALUE_COL,
          freq="4D",
          tz="US/Pacific",
      )
      expected = expected.tz_localize("US/Pacific")
      assert canonical_data_dict["time_stats"]["added_timepoints"] == 0
      assert (
          canonical_data_dict["time_stats"]["dropped_timepoints"] == 0
      )
      assert_equal(canonical_data_dict["df"], expected)
  
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 6 for calling a global function with example usage: test_gcd_dates() without return types