code: def test_chunking_univariate_gaps():
      # create some dummy data
      series = pd.Series(
          index=pd.date_range(
              datetime.now(), periods=10_000, freq="1s"
          ),
          data=np.ones(10_000),
      ).rename("1hz_series")
  
      series = series.drop(series.index[10:20])
      series = series.drop(series.index[1000:1003])
  
      # no chunk limitations -> so we should get 3 chunks and in total, the sum of all
      # outs must be len(series)
      out = chunk_data(
          data=series,
          fs_dict={"1hz_series": 1},
          copy=True,
          verbose=True,
      )
      assert len(out) == 3
      assert sum(len(out[i][0]) for i in range(len(out))) == len(series)
  
      # min chunk duration -> will now disregard the first chunk
      out = chunk_data(
          data=series,
          fs_dict={"1hz_series": 1},
          copy=True,
          verbose=True,
          min_chunk_dur="30s",
      )
      assert len(out) == 2
  
      # drop an additional chunk, making the first and chunk which orignates from 0:10 and
      # will now be split up in 0:2 and 8:10 both too small -> both chunks will be dropped
      # len = 2
      series = series.drop(series.index[2:8])
      out = chunk_data(
          data=series,
          fs_dict={"1hz_series": 1},
          copy=True,
          verbose=True,
      )
      assert len(out) == 2
  
file_path: tsflex/tests/test_chunking.py
imports: from datetime import datetime
  import numpy
  import pandas
  import pytest
  from tsflex.chunking import chunk_data
label_desc: Use image node_id 6 for calling a global function with example usage: test_chunking_univariate_gaps() without return types