code: def check_python_version(infile: IO) -> None:
      """
      Check the Python version between the running process and the one used to serialize the command.
      """
      version = utf8_deserializer.loads(infile)
      worker_version = "%d.%d" % sys.version_info[:2]
      if version != worker_version:
          raise PySparkRuntimeError(
              error_class="PYTHON_VERSION_MISMATCH",
              message_parameters={
                  "worker_version": worker_version,
                  "driver_version": str(version),
              },
          )
  
file_path: spark/python/pyspark/worker_util.py
imports: import importlib
  from inspect import currentframe, getframeinfo
  import os
  import sys
  from typing import Any, IO
  import warnings
  from pyspark.accumulators import _accumulatorRegistry
  from pyspark.broadcast import Broadcast, _broadcastRegistry
  from pyspark.errors import PySparkRuntimeError
  from pyspark.files import SparkFiles
  from pyspark.java_gateway import local_connect_and_auth
  from pyspark.serializers import read_bool, read_int, read_long, write_int, FramedSerializer, UTF8Deserializer, CPickleSerializer
label_desc: Use image node_id 3 for calling a global function with example usage: check_python_version(infile) without return types