code: def test_single_table_spark_entityset_dates_not_sorted():
      spark_es = EntitySet(id="spark_es")
      df = pd.DataFrame(
          {
              "id": [0, 1, 2, 3],
              "values": [1, 12, -34, 27],
              "dates": [
                  pd.to_datetime("2019-01-10"),
                  pd.to_datetime("2019-02-03"),
                  pd.to_datetime("2019-01-01"),
                  pd.to_datetime("2017-08-25"),
              ],
          },
      )
  
      primitives_list = ["absolute", "is_weekend", "year", "day"]
      values_dd = ps.from_pandas(df)
      ltypes = {
          "values": Integer,
          "dates": Datetime,
      }
      spark_es.add_dataframe(
          dataframe_name="data",
          dataframe=values_dd,
          index="id",
          time_index="dates",
          logical_types=ltypes,
      )
  
      spark_fm, _ = dfs(
          entityset=spark_es,
          target_dataframe_name="data",
          trans_primitives=primitives_list,
          max_depth=1,
      )
  
      pd_es = EntitySet(id="pd_es")
      pd_es.add_dataframe(
          dataframe_name="data",
          dataframe=df,
          index="id",
          time_index="dates",
          logical_types=ltypes,
      )
  
      fm, _ = dfs(
          entityset=pd_es,
          target_dataframe_name="data",
          trans_primitives=primitives_list,
          max_depth=1,
      )
  
      spark_fm = spark_fm.to_pandas().astype({"id": "int64"})
      spark_fm = spark_fm.set_index("id").loc[fm.index]
      pd.testing.assert_frame_equal(
          fm.astype(spark_fm.dtypes), spark_fm
      )
  
file_path: featuretools/featuretools/tests/synthesis/test_spark_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 6 for calling a global function with example usage: test_single_table_spark_entityset_dates_not_sorted() without return types