code: def test_min_gap_in_seconds():
      """Tests min_gap_in_seconds"""
      date_list = pd.date_range(
          start=datetime.datetime(2019, 1, 1), periods=20, freq="H"
      ).tolist()
      df = pd.DataFrame({"ts": date_list})
      assert (
          min_gap_in_seconds(df=df, time_col="ts")
          == TimeEnum.ONE_HOUR_IN_SECONDS.value
      )
  
      date_list = pd.date_range(
          start=datetime.datetime(2019, 1, 1), periods=20, freq="6H"
      ).tolist()
      df = pd.DataFrame({"ts": date_list})
      assert (
          min_gap_in_seconds(df=df, time_col="ts")
          == 6 * TimeEnum.ONE_HOUR_IN_SECONDS.value
      )
  
      date_list = pd.date_range(
          start=datetime.datetime(2019, 1, 1), periods=20, freq="MIN"
      ).tolist()
      df = pd.DataFrame({"ts": date_list})
      assert (
          min_gap_in_seconds(df=df, time_col="ts")
          == TimeEnum.ONE_MINUTE_IN_SECONDS.value
      )
  
      date_list = pd.date_range(
          start=datetime.datetime(2019, 1, 1), periods=20, freq="5S"
      ).tolist()
      df = pd.DataFrame({"ts": date_list})
      assert min_gap_in_seconds(df=df, time_col="ts") == 5
  
      df = pd.DataFrame(
          {
              "ts": [
                  "2019-01-03",
                  "2019-01-05",
                  "2019-01-08",
                  "2019-01-10",
              ]
          }
      )
      assert (
          min_gap_in_seconds(df=df, time_col="ts")
          == 2 * TimeEnum.ONE_DAY_IN_SECONDS.value
      )
  
      df = pd.DataFrame(
          {
              "ts": [
                  "2018-01-01",
                  "2019-01-01",
                  "2020-01-01",
                  "2021-01-01",
              ]
          }
      )
      assert (
          min_gap_in_seconds(df=df, time_col="ts")
          == TimeEnum.ONE_YEAR_IN_SECONDS.value
      )
  
      df = pd.DataFrame({"ts": ["2018-01-01"]})
      with pytest.raises(
          ValueError,
          match="Must provide at least two data points. Found 1.",
      ):
          min_gap_in_seconds(df=df, time_col="ts")
  
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 2 for calling a global function with example usage: test_min_gap_in_seconds() without return types