code: def test_add_last_time_indexes():
      pd_es = EntitySet(id="pd_es")
      dask_es = EntitySet(id="dask_es")
  
      sessions = pd.DataFrame(
          {
              "id": [0, 1, 2, 3],
              "user": [1, 2, 1, 3],
              "time": [
                  pd.to_datetime("2019-01-10"),
                  pd.to_datetime("2019-02-03"),
                  pd.to_datetime("2019-01-01"),
                  pd.to_datetime("2017-08-25"),
              ],
              "strings": ["I am a string", "23", "abcdef ghijk", ""],
          },
      )
      sessions_dask = dd.from_pandas(sessions, npartitions=2)
      sessions_logical_types = {
          "id": Integer,
          "user": Integer,
          "time": Datetime,
          "strings": NaturalLanguage,
      }
  
      transactions = pd.DataFrame(
          {
              "id": [0, 1, 2, 3, 4, 5],
              "session_id": [0, 0, 1, 2, 2, 3],
              "amount": [1.23, 5.24, 123.52, 67.93, 40.34, 50.13],
              "time": [
                  pd.to_datetime("2019-01-10 03:53"),
                  pd.to_datetime("2019-01-10 04:12"),
                  pd.to_datetime("2019-02-03 10:34"),
                  pd.to_datetime("2019-01-01 12:35"),
                  pd.to_datetime("2019-01-01 12:49"),
                  pd.to_datetime("2017-08-25 04:53"),
              ],
          },
      )
      transactions_dask = dd.from_pandas(transactions, npartitions=2)
  
      transactions_logical_types = {
          "id": Integer,
          "session_id": Integer,
          "time": Datetime,
          "amount": Double,
      }
  
      pd_es.add_dataframe(
          dataframe_name="sessions",
          dataframe=sessions,
          index="id",
          time_index="time",
      )
      dask_es.add_dataframe(
          dataframe_name="sessions",
          dataframe=sessions_dask,
          index="id",
          time_index="time",
          logical_types=sessions_logical_types,
      )
  
      pd_es.add_dataframe(
          dataframe_name="transactions",
          dataframe=transactions,
          index="id",
          time_index="time",
      )
      dask_es.add_dataframe(
          dataframe_name="transactions",
          dataframe=transactions_dask,
          index="id",
          time_index="time",
          logical_types=transactions_logical_types,
      )
  
      pd_es = pd_es.add_relationship(
          "sessions", "id", "transactions", "session_id"
      )
      dask_es = dask_es.add_relationship(
          "sessions", "id", "transactions", "session_id"
      )
  
      assert (
          "foreign_key"
          in pd_es["transactions"].ww.semantic_tags["session_id"]
      )
      assert (
          "foreign_key"
          in dask_es["transactions"].ww.semantic_tags["session_id"]
      )
  
      assert (
          pd_es["sessions"].ww.metadata.get("last_time_index") is None
      )
      assert (
          dask_es["sessions"].ww.metadata.get("last_time_index") is None
      )
  
      pd_es.add_last_time_indexes()
      dask_es.add_last_time_indexes()
  
      pd_lti_name = pd_es["sessions"].ww.metadata.get("last_time_index")
      spark_lti_name = dask_es["sessions"].ww.metadata.get(
          "last_time_index"
      )
      assert pd_lti_name == spark_lti_name
      pd.testing.assert_series_equal(
          pd_es["sessions"][pd_lti_name].sort_index(),
          dask_es["sessions"][spark_lti_name].compute().sort_index(),
          check_names=False,
      )
  
file_path: featuretools/featuretools/tests/entityset_tests/test_dask_es.py
imports: import pandas
  import pytest
  from woodwork.logical_types import Categorical, Datetime, Double, Integer, NaturalLanguage
  from featuretools.entityset import EntitySet
  from featuretools.tests.testing_utils import get_df_tags
  from featuretools.utils.gen_utils import Library, import_or_none
label_desc: Use image node_id 4 for calling a global function with example usage: test_add_last_time_indexes() without return types