code: def describe_week_start_date():
      def it_works_with_start_date_of_monday(spark):
          df = quinn.create_df(
              spark,
              [
                  # converts a Thursday to the Monday before
                  (
                      datetime.datetime(2020, 1, 2),
                      datetime.datetime(2019, 12, 30),
                  ),
                  # converts a Wednesday to the Monday before
                  (
                      datetime.datetime(2020, 7, 15),
                      datetime.datetime(2020, 7, 13),
                  ),
                  # doesn't change if the day in a Monday
                  (
                      datetime.datetime(2020, 7, 20),
                      datetime.datetime(2020, 7, 20),
                  ),
                  (None, None),
              ],
              [
                  ("some_date", DateType(), True),
                  ("expected", DateType(), True),
              ],
          )
          actual_df = df.withColumn(
              "week_start_date",
              quinn.week_start_date(F.col("some_date"), "Mon"),
          )
          chispa.assert_column_equality(
              actual_df, "week_start_date", "expected"
          )
  
      def it_defaults_to_sunday_start_date(spark):
          df = quinn.create_df(
              spark,
              [
                  # converts a Tuesday to the Sunday before
                  (
                      datetime.datetime(2020, 1, 2),
                      datetime.datetime(2019, 12, 29),
                  ),
                  # converts a Wednesday to the Sunday before
                  (
                      datetime.datetime(2020, 7, 15),
                      datetime.datetime(2020, 7, 12),
                  ),
                  # doesn't change if the day is Sunday
                  (
                      datetime.datetime(2020, 7, 26),
                      datetime.datetime(2020, 7, 26),
                  ),
                  (None, None),
              ],
              [
                  ("some_date", DateType(), True),
                  ("expected", DateType(), True),
              ],
          )
          actual_df = df.withColumn(
              "week_start_date",
              quinn.week_start_date(F.col("some_date")),
          )
          chispa.assert_column_equality(
              actual_df, "week_start_date", "expected"
          )
  
      def it_errors_out_if_with_invalid_week_start_date(spark):
          df = quinn.create_df(
              spark,
              [
                  (
                      datetime.datetime(2020, 1, 2),
                      datetime.datetime(2019, 12, 29),
                  ),
              ],
              [
                  ("some_date", DateType(), True),
                  ("expected", DateType(), True),
              ],
          )
          with pytest.raises(ValueError) as excinfo:
              df.withColumn(
                  "week_start_date",
                  quinn.week_start_date(F.col("some_date"), "hello"),
              )
          assert (
              excinfo.value.args[0]
              == "The day you entered 'hello' is not valid.  Here are the valid days: [Mon,Tue,Wed,Thu,Fri,Sat,Sun]"
          )
  
imports: import pytest
  import pyspark.sql.functions
  from pyspark.sql.types import StructField, StructType, BooleanType, DateType, IntegerType, ArrayType, FloatType, StringType, MapType
  import quinn
  from tests.conftest import auto_inject_fixtures
  import chispa
  import datetime
  import uuid
label_desc: Use image node_id 8 for calling a global function with example usage: describe_week_start_date() without return types