code: def test_dask_entityset_secondary_time_index():
      log_df = pd.DataFrame()
      log_df["id"] = [0, 1, 2, 3]
      log_df["scheduled_time"] = pd.to_datetime(
          ["2019-01-01", "2019-01-01", "2019-01-01", "2019-01-01"],
      )
      log_df["departure_time"] = pd.to_datetime(
          [
              "2019-02-01 09:00",
              "2019-02-06 10:00",
              "2019-02-12 10:00",
              "2019-03-01 11:30",
          ],
      )
      log_df["arrival_time"] = pd.to_datetime(
          [
              "2019-02-01 11:23",
              "2019-02-06 12:45",
              "2019-02-12 13:53",
              "2019-03-01 14:07",
          ],
      )
      log_df["delay"] = [-2, 10, 60, 0]
      log_df["flight_id"] = [0, 1, 0, 1]
      log_dask = dd.from_pandas(log_df, npartitions=2)
  
      flights_df = pd.DataFrame()
      flights_df["id"] = [0, 1, 2, 3]
      flights_df["origin"] = ["BOS", "LAX", "BOS", "LAX"]
      flights_dask = dd.from_pandas(flights_df, npartitions=2)
  
      pd_es = EntitySet("flights")
      dask_es = EntitySet("flights_dask")
  
      log_ltypes = {
          "scheduled_time": Datetime,
          "departure_time": Datetime,
          "arrival_time": Datetime,
          "delay": Double,
      }
  
      pd_es.add_dataframe(
          dataframe_name="logs",
          dataframe=log_df,
          index="id",
          time_index="scheduled_time",
          secondary_time_index={
              "arrival_time": ["departure_time", "delay"]
          },
          logical_types=log_ltypes,
      )
  
      dask_es.add_dataframe(
          dataframe_name="logs",
          dataframe=log_dask,
          index="id",
          logical_types=log_ltypes,
          semantic_tags={"flight_id": "foreign_key"},
          time_index="scheduled_time",
          secondary_time_index={
              "arrival_time": ["departure_time", "delay"]
          },
      )
  
      pd_es.add_dataframe(
          dataframe_name="flights", dataframe=flights_df, index="id"
      )
      flights_ltypes = pd_es["flights"].ww.logical_types
      dask_es.add_dataframe(
          dataframe_name="flights",
          dataframe=flights_dask,
          index="id",
          logical_types=flights_ltypes,
      )
  
      pd_es.add_relationship("flights", "id", "logs", "flight_id")
      dask_es.add_relationship("flights", "id", "logs", "flight_id")
  
      cutoff_df = pd.DataFrame()
      cutoff_df["id"] = [0, 1, 1]
      cutoff_df["time"] = pd.to_datetime(
          ["2019-02-02", "2019-02-02", "2019-02-20"]
      )
  
      fm, _ = dfs(
          entityset=pd_es,
          target_dataframe_name="logs",
          cutoff_time=cutoff_df,
          agg_primitives=["max"],
          trans_primitives=["month"],
      )
  
      dask_fm, _ = dfs(
          entityset=dask_es,
          target_dataframe_name="logs",
          cutoff_time=cutoff_df,
          agg_primitives=["max"],
          trans_primitives=["month"],
      )
  
      # Make sure both matrixes are sorted the same
      # Also need to account for index differences
      dask_fm_computed = (
          dask_fm.compute().astype({"id": "int64"}).set_index("id")
      )
      pd.testing.assert_frame_equal(
          fm.sort_values("delay"),
          dask_fm_computed.sort_values("delay"),
          check_dtype=False,
      )
  
file_path: featuretools/featuretools/tests/synthesis/test_dask_dfs.py
imports: import pandas
  import pytest
  from woodwork.logical_types import Datetime, Double, Integer, IntegerNullable, NaturalLanguage
  from featuretools import dfs
  from featuretools.entityset import EntitySet
  from featuretools.utils.gen_utils import import_or_none
label_desc: Use image node_id 7 for calling a global function with example usage: test_dask_entityset_secondary_time_index() without return types