code: def test_accepts_pd_dateoffset_training_window(datetime_es):
      # TODO: Update to use Dask dataframes when issue #882 is closed
      feature_matrix, _ = dfs(
          entityset=datetime_es,
          target_dataframe_name="transactions",
          cutoff_time=pd.Timestamp("2012-3-31 04:00"),
          training_window=pd.DateOffset(months=2),
      )
  
      feature_matrix_2, _ = dfs(
          entityset=datetime_es,
          target_dataframe_name="transactions",
          cutoff_time=pd.Timestamp("2012-3-31 04:00"),
          training_window=pd.offsets.BDay(44),
      )
  
      assert (feature_matrix.index == [2, 3, 4]).all()
      assert (feature_matrix.index == feature_matrix_2.index).all()
  
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 15 for calling a global function with example usage: test_accepts_pd_dateoffset_training_window(datetime_es) without return types