code: def test_limit_dates_from_val_in_train():
      train_ds = dataset_from_dict(
          {
              "col1": [
                  datetime(2021, 10, 3, 0, 0),
                  datetime(2021, 10, 3, 0, 0),
                  datetime(2021, 10, 4, 0, 0),
                  datetime(2021, 10, 4, 0, 0),
                  datetime(2021, 10, 4, 0, 0),
                  datetime(2021, 10, 5, 0, 0),
                  datetime(2021, 10, 5, 0, 0),
              ]
          },
          "col1",
      )
      val_ds = dataset_from_dict(
          {
              "col1": [
                  datetime(2021, 9, 4, 0, 0),
                  datetime(2021, 10, 4, 0, 0),
                  datetime(2021, 10, 5, 0, 0),
                  datetime(2021, 10, 6, 0, 0),
              ]
          },
          "col1",
      )
      check_obj = DateTrainTestLeakageDuplicates(n_to_show=1)
      result = check_obj.run(train_ds, val_ds)
      assert_that(result.value, close_to(0.5, 0.01))
      assert_that(result.display, has_length(greater_than(0)))
  
imports: from datetime import datetime
  import numpy
  import pandas
  from hamcrest import assert_that, calling, close_to, equal_to, greater_than, has_items, has_length, raises
  from deepchecks.core.errors import DatasetValidationError, DeepchecksValueError
  from deepchecks.tabular.checks.train_test_validation import DateTrainTestLeakageDuplicates, DateTrainTestLeakageOverlap
  from deepchecks.tabular.dataset import Dataset
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 3 for calling a global function with example usage: test_limit_dates_from_val_in_train() without return types