code: def test_spark_flow_with_fitted(horizon, use_x, sample_data):
      series, X_df = sample_data
      if not use_x:
          X_df = None
      pipeline_fitted(series, X_df, horizon)
  
file_path: statsforecast/action_files/test_spark.py
imports: import sys
  import pytest
  from pyspark.sql import SparkSession
  from .utils import pipeline, pipeline_with_level, pipeline_fitted
label_desc: Use image node_id 6 for calling a global function with example usage: test_spark_flow_with_fitted(horizon, use_x, sample_data) without return types