code: def test_replace_dataframe_recalculate_last_time_index_not_present(
      es,
  ):
      es.add_last_time_indexes()
  
      original_time_index = es["log"]["datetime"].copy()
  
      if ps and isinstance(original_time_index, ps.Series):
          new_time_index = ps.from_pandas(
              original_time_index.to_pandas() + pd.Timedelta(days=10),
          )
      else:
          new_time_index = original_time_index + pd.Timedelta(days=10)
  
      new_dataframe = es["log"].copy()
      new_dataframe["datetime"] = new_time_index
      new_dataframe.pop(LTI_COLUMN_NAME)
  
      es.replace_dataframe(
          "log", new_dataframe, recalculate_last_time_indexes=True
      )
      pd.testing.assert_series_equal(
          to_pandas(es["log"]["datetime"]).sort_index(),
          to_pandas(new_time_index).sort_index(),
          check_names=False,
      )
      pd.testing.assert_series_equal(
          to_pandas(es["log"][LTI_COLUMN_NAME]).sort_index(),
          to_pandas(new_time_index).sort_index(),
          check_names=False,
      )
  
imports: from datetime import datetime
  import numpy
  import pandas
  import pytest
  from woodwork.exceptions import TypeConversionError
  from woodwork.logical_types import Boolean, Categorical, Datetime, Double, Integer, NaturalLanguage
  from featuretools.entityset.entityset import LTI_COLUMN_NAME, EntitySet
  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 50 for calling a global function with example usage: test_replace_dataframe_recalculate_last_time_index_not_present(es) without return types