code: def test_spark_get_sample(df):
      config = Settings()
      config.samples.head = 17
      config.samples.random = 0
      config.samples.tail = 0
  
      res = spark_get_sample(config, df)
      assert len(res) == 1
      assert res[0].id == "head"
      assert len(res[0].data) == 17
  
      config = Settings()
      config.samples.head = 0
      config.samples.random = 0
      config.samples.tail = 0
  
      res = spark_get_sample(config, df)
      assert len(res) == 0
  
file_path: ydata-profiling/tests/backends/spark_backend/test_sample_spark.py
imports: import pandas
  import pytest
  from pyspark.sql.types import IntegerType, StringType, StructField, StructType
  from ydata_profiling.config import Settings
  from ydata_profiling.model.spark.sample_spark import spark_get_sample
label_desc: Use image node_id 3 for calling a global function with example usage: test_spark_get_sample(df) without return types