code: def test_check_time_series_gaps():
      """Checks gaps filled for non-regular input"""
      ts = UnivariateTimeSeries()
      df = pd.DataFrame(
          {
              TIME_COL: [
                  dt(2018, 1, 1, 0, 0, 1),
                  dt(2018, 1, 1, 0, 0, 2),
                  dt(
                      2018, 1, 1, 0, 0, 10
                  ),  # intentionally out of order
                  dt(2018, 1, 1, 0, 0, 4),
              ],
              VALUE_COL: [1, 2, 3, 4],
          }
      )
  
      expected = pd.Series(
          [
              dt(2018, 1, 1, 0, 0, 1),
              dt(2018, 1, 1, 0, 0, 2),
              dt(2018, 1, 1, 0, 0, 3),
              dt(2018, 1, 1, 0, 0, 4),
              dt(2018, 1, 1, 0, 0, 5),
              dt(2018, 1, 1, 0, 0, 6),
              dt(2018, 1, 1, 0, 0, 7),
              dt(2018, 1, 1, 0, 0, 8),
              dt(2018, 1, 1, 0, 0, 9),
              dt(2018, 1, 1, 0, 0, 10),
          ]
      )
      expected.index = expected
      ts.load_data(
          df, TIME_COL, VALUE_COL, freq="S"
      )  # the frequency should be provided when there are gaps
      assert ts.df[TIME_COL].equals(expected)
      assert ts.time_stats["data_points"] == 10  # after filling in gaps
      assert ts.value_stats["count"] == 4  # before filling in gaps
      assert ts.time_stats["added_timepoints"] == 6
      assert ts.time_stats["dropped_timepoints"] == 0
      assert ts.df[VALUE_COL].equals(ts.y)
  
      expected_gaps = pd.DataFrame(
          {
              "right_before_gap": pd.Series(
                  [dt(2018, 1, 1, 0, 0, 2), dt(2018, 1, 1, 0, 0, 4)]
              ),
              "right_after_gap": pd.Series(
                  [dt(2018, 1, 1, 0, 0, 4), dt(2018, 1, 1, 0, 0, 10)]
              ),
              "gap_size": [1.0, 5.0],
          }
      )
      assert ts.time_stats["gaps"].equals(expected_gaps)
  
imports: import datetime
  from datetime import datetime
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  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.python_utils import assert_equal
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.common.time_properties import get_canonical_data
  from greykite.common.viz.timeseries_plotting import add_groupby_column
  from greykite.framework.benchmark.data_loader_ts import DataLoaderTS
  from greykite.framework.constants import MEAN_COL_GROUP
  from greykite.framework.constants import OVERLAY_COL_GROUP
  from greykite.framework.constants import QUANTILE_COL_GROUP
  from greykite.framework.input.univariate_time_series import UnivariateTimeSeries
label_desc: Use image node_id 4 for calling a global function with example usage: test_check_time_series_gaps() without return types