code: def describe_sort_columns():
      def it_sorts_columns_in_asc_order(spark):
          source_df = quinn.create_df(
              spark,
              [
                  ("jose", "oak", "switch"),
                  ("li", "redwood", "xbox"),
                  ("luisa", "maple", "ps4"),
              ],
              [
                  ("name", StringType(), True),
                  ("tree", StringType(), True),
                  ("gaming_system", StringType(), True),
              ],
          )
          actual_df = quinn.sort_columns(source_df, "asc")
          expected_df = quinn.create_df(
              spark,
              [
                  ("switch", "jose", "oak"),
                  ("xbox", "li", "redwood"),
                  ("ps4", "luisa", "maple"),
              ],
              [
                  ("gaming_system", StringType(), True),
                  ("name", StringType(), True),
                  ("tree", StringType(), True),
              ],
          )
          chispa.assert_df_equality(actual_df, expected_df)
  
      def it_sorts_columns_in_desc_order(spark):
          source_df = quinn.create_df(
              spark,
              [
                  ("jose", "oak", "switch"),
                  ("li", "redwood", "xbox"),
                  ("luisa", "maple", "ps4"),
              ],
              [
                  ("name", StringType(), True),
                  ("tree", StringType(), True),
                  ("gaming_system", StringType(), True),
              ],
          )
          actual_df = quinn.sort_columns(source_df, "desc")
          expected_df = quinn.create_df(
              spark,
              [
                  ("oak", "jose", "switch"),
                  ("redwood", "li", "xbox"),
                  ("maple", "luisa", "ps4"),
              ],
              [
                  ("tree", StringType(), True),
                  ("name", StringType(), True),
                  ("gaming_system", StringType(), True),
              ],
          )
          chispa.assert_df_equality(actual_df, expected_df)
  
      def it_throws_an_error_if_the_sort_order_is_invalid(spark):
          source_df = quinn.create_df(
              spark,
              [
                  ("jose", "oak", "switch"),
                  ("li", "redwood", "xbox"),
                  ("luisa", "maple", "ps4"),
              ],
              [
                  ("name", StringType(), True),
                  ("tree", StringType(), True),
                  ("gaming_system", StringType(), True),
              ],
          )
          with pytest.raises(ValueError) as excinfo:
              quinn.sort_columns(source_df, "cats")
          assert (
              excinfo.value.args[0]
              == "['asc', 'desc'] are the only valid sort orders and you entered a sort order of 'cats'"
          )
  
imports: from __future__ import annotations
  import pytest
  import chispa
  import quinn
  from pyspark.sql import DataFrame
  from pyspark.sql.types import StructType, StructField, StringType, IntegerType, ArrayType, MapType
  from quinn.transformations import flatten_struct, flatten_map, flatten_dataframe
  from tests.conftest import auto_inject_fixtures
label_desc: Use image node_id 4 for calling a global function with example usage: describe_sort_columns() without return types