code: def test_handles_pandas_overflow_error(datetime_es):
      # pandas 1.5.0 raises ValueError, older versions raised OverflowError
      with pytest.raises((OverflowError, ValueError)):
          _, _ = dfs(
              entityset=datetime_es,
              target_dataframe_name="transactions",
              cutoff_time="200000000000000000000000000000000000000000000000000000000000000000-3-31 04:00",
              training_window=pd.DateOffset(months=2),
          )
  
imports: from unittest.mock import patch
  import composeml
  import numpy
  import pandas
  import pytest
  from packaging.version import parse
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import NaturalLanguage
  from featuretools.computational_backends.calculate_feature_matrix import FEATURE_CALCULATION_PERCENTAGE
  from featuretools.entityset import EntitySet, Timedelta
  from featuretools.exceptions import UnusedPrimitiveWarning
  from featuretools.primitives import GreaterThanScalar, Max, Mean, Min, Sum
  from featuretools.primitives.base import AggregationPrimitive, TransformPrimitive
  from featuretools.synthesis import dfs
  from featuretools.synthesis.deep_feature_synthesis import DeepFeatureSynthesis
  from featuretools.tests.testing_utils import to_pandas
  from featuretools.utils.gen_utils import Library, import_or_none, is_instance
label_desc: Use image node_id 18 for calling a global function with example usage: test_handles_pandas_overflow_error(datetime_es) without return types