code: def _test() -> None:
      import os
      import sys
      from pyspark.testing.utils import search_jar
  
      avro_jar = search_jar(
          "connector/avro", "spark-avro", "spark-avro"
      )
      if avro_jar is None:
          print(
              "Skipping all Avro Python tests as the optional Avro project was "
              "not compiled into a JAR. To run these tests, "
              "you need to build Spark with 'build/sbt -Pavro package' or "
              "'build/mvn -Pavro package' before running this test."
          )
          sys.exit(0)
      else:
          existing_args = os.environ.get(
              "PYSPARK_SUBMIT_ARGS", "pyspark-shell"
          )
          jars_args = "--jars %s" % avro_jar
          os.environ["PYSPARK_SUBMIT_ARGS"] = " ".join(
              [jars_args, existing_args]
          )
  
      import doctest
      from pyspark.sql import SparkSession as PySparkSession
      import pyspark.sql.connect.avro.functions
  
      globs = pyspark.sql.connect.avro.functions.__dict__.copy()
  
      globs["spark"] = (
          PySparkSession.builder.appName(
              "sql.connect.avro.functions tests"
          )
          .remote("local[4]")
          .getOrCreate()
      )
  
      (failure_count, test_count) = doctest.testmod(
          pyspark.sql.connect.avro.functions,
          globs=globs,
          optionflags=doctest.ELLIPSIS
          | doctest.NORMALIZE_WHITESPACE
          | doctest.IGNORE_EXCEPTION_DETAIL,
      )
  
      globs["spark"].stop()
  
      if failure_count:
          sys.exit(-1)
  
file_path: spark/python/pyspark/sql/connect/avro/functions.py
imports: from pyspark.sql.connect.utils import check_dependencies
  from typing import Dict, Optional, TYPE_CHECKING
  from pyspark.sql.avro import functions
  from pyspark.sql.connect.column import Column
  from pyspark.sql.connect.functions.builtin import _invoke_function, _to_col, _options_to_col, lit
label_desc: Use image node_id 3 for calling a global function with example usage: _test() without return types