code: def test_validator_with_gap():
      model = lgbm_classification_learner(
          target="target",
          features=["feat1", "feat2"],
          extra_params={"verbose": -1},
      )
  
      df_gap = pd.DataFrame(
          {
              "feat1": [1, 2, 1, 5, 2, 1, 5, 6, 8, 1, 7, 5, 1, 2],
              "feat2": [1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0],
              "target": [1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0],
              "date": [
                  datetime.strptime(d, "%Y-%m-%d")
                  for d in [
                      "2021-01-01",
                      "2021-01-09",
                      "2021-02-08",
                      "2021-02-10",
                      "2021-03-20",
                      "2021-03-11",
                      "2021-07-01",
                      "2021-07-02",
                      "2021-09-15",
                      "2021-09-15",
                      "2021-10-01",
                      "2021-10-02",
                      "2021-11-15",
                      "2021-11-15",
                  ]
              ],
          }
      )
  
      split_fn_gap = splitters.forward_stability_curve_time_splitter(
          training_time_start=df_gap["date"].min(),
          training_time_end=df_gap["date"].min() + timedelta(60),
          time_column="date",
          step=timedelta(30),
          holdout_size=timedelta(30),
      )
  
      eval_fn_gap = evaluators.roc_auc_evaluator(
          prediction_column="prediction", target_column="target"
      )
  
      with pytest.raises(Exception):
          validator(
              df_gap,
              split_fn_gap,
              model,
              eval_fn_gap,
              drop_empty_folds=False,
          )
  
      validator_log = validator(
          df_gap,
          split_fn_gap,
          model,
          eval_fn_gap,
          drop_empty_folds=True,
      )["validator_log"]
  
      assert len(validator_log[0]) == 3
      assert len(validator_log[0]["eval_results"]) == 1
  
file_path: fklearn/tests/validation/test_validator.py
imports: import warnings
  from datetime import datetime, timedelta
  import pandas
  from toolz.functoolz import identity
  from fklearn.training.classification import lgbm_classification_learner
  from fklearn.validation import splitters, evaluators
  from fklearn.validation.validator import validator_iteration, validator, parallel_validator
  from fklearn.validation.perturbators import perturbator, nullify
  import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: test_validator_with_gap() without return types