code: def run(self):
      install.run(self)
  
      # Make sure the destination is always clean.
      spark_dist = os.path.join(
          self.install_lib, "pyspark", "spark-distribution"
      )
      rmtree(spark_dist, ignore_errors=True)
  
      if ("PYSPARK_HADOOP_VERSION" in os.environ) or (
          "PYSPARK_HIVE_VERSION" in os.environ
      ):
          # Note that PYSPARK_VERSION environment is just a testing purpose.
          # PYSPARK_HIVE_VERSION environment variable is also internal for now in case
          # we support another version of Hive in the future.
          (
              spark_version,
              hadoop_version,
              hive_version,
          ) = install_module.checked_versions(
              os.environ.get("PYSPARK_VERSION", VERSION).lower(),
              os.environ.get(
                  "PYSPARK_HADOOP_VERSION",
                  install_module.DEFAULT_HADOOP,
              ).lower(),
              os.environ.get(
                  "PYSPARK_HIVE_VERSION", install_module.DEFAULT_HIVE
              ).lower(),
          )
  
          if "PYSPARK_VERSION" not in os.environ and (
              (
                  install_module.DEFAULT_HADOOP,
                  install_module.DEFAULT_HIVE,
              )
              == (hadoop_version, hive_version)
          ):
              # Do not download and install if they are same as default.
              return
  
          install_module.install_spark(
              dest=spark_dist,
              spark_version=spark_version,
              hadoop_version=hadoop_version,
              hive_version=hive_version,
          )
  
file_path: spark/python/setup.py
imports: import importlib.util
  import glob
  import os
  import sys
  import ctypes
  from setuptools import setup
  from setuptools.command.install import install
  from shutil import copyfile, copytree, rmtree
label_desc: Use image node_id 1 for calling the InstallCommand obj's underlying member method code with example usage: obj.run() without return types