code: def _test() -> None:
      import doctest
  
      globs = globals().copy()
      from pyspark.sql import SparkSession
  
      spark = (
          SparkSession.builder.master("local[4]")
          .appName("mllib.tree tests")
          .getOrCreate()
      )
      globs["sc"] = spark.sparkContext
      (failure_count, test_count) = doctest.testmod(
          globs=globs,
          optionflags=doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE,
      )
      spark.stop()
      if failure_count:
          sys.exit(-1)
  
imports: import sys
  import random
  from pyspark import RDD, since
  from pyspark.mllib.common import callMLlibFunc, inherit_doc, JavaModelWrapper
  from pyspark.mllib.linalg import _convert_to_vector
  from pyspark.mllib.regression import LabeledPoint
  from pyspark.mllib.util import JavaLoader, JavaSaveable
  from typing import Dict, Optional, Tuple, Union, overload, TYPE_CHECKING
  from pyspark.rdd import RDD
label_desc: Use image node_id 1 for calling a global function with example usage: _test() without return types