code: def test_infer_freq():
      freq_list = [
          "B",
          "W",
          "W-SAT",
          "W-TUE",
          "M",
          "MS",
          "SM",
          "SMS",
          "CBMS",
          "BM",
          "B",
          "Q",
          "QS",
          "BQS",
          "BQ-NOV",
          "Y",
          "A-JAN",
          "YS",
          "AS-SEP",
          "BH",
          "T",
          "S",
      ]
  
      for freq in freq_list:
          date_list = pd.date_range(
              start="2020-06-10", periods=100, freq=freq
          ).tolist()
          df = pd.DataFrame({TIME_COL: date_list})
  
          # With complete timestamps
          pandas_freq_complete = pd.infer_freq(df[TIME_COL])
          inferred_freq_complete = infer_freq(df, TIME_COL)
  
          # With NaN timestamps
          df[TIME_COL][5:8] = np.nan
          df[TIME_COL][32:40] = None
          pandas_freq_nan = pd.infer_freq(df[TIME_COL])
          inferred_freq_nan = infer_freq(df, TIME_COL)
  
          # With missing timestamps
          df = df[df[TIME_COL].notna()]
          pandas_freq_missing = pd.infer_freq(df[TIME_COL])
          inferred_freq_missing = infer_freq(df, TIME_COL)
  
          print(
              freq,
              pandas_freq_complete,
              inferred_freq_complete,
              inferred_freq_nan,
          )
  
          assert pandas_freq_nan == pandas_freq_missing is None
          assert (
              pandas_freq_complete
              == inferred_freq_complete
              == inferred_freq_missing
              == inferred_freq_complete
          )
  
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 12 for calling a global function with example usage: test_infer_freq() without return types