code: def test_dataframe_spark(spark_context):
      n_samples = 1000
      start = datetime.today()
      df = pd.DataFrame(
          {
              "date": [
                  start + timedelta(days=delta)
                  for delta in range(n_samples)
              ],
              "f1": [1] * n_samples,
              "f2": [0] * n_samples,
          }
      )
      spark_df = spark_context.createDataFrame(df)
      return spark_df
  
file_path: popmon/tests/popmon/spark/test_split_dataset_spark.py
imports: from datetime import datetime, timedelta
  from pathlib import Path
  import pandas
  import pytest
  from popmon.pipeline.dataset_splitter import split_dataset
label_desc: Use image node_id 2 for calling a global function with example usage: test_dataframe_spark(spark_context) and returns: spark_df