code: def _cleanup_spark(
      spark, current_spark_config, row_group_size_mb=None
  ):
      """
      Cleans up config changes performed in _init_spark
      """
      hadoop_config = spark.sparkContext._jsc.hadoopConfiguration()
  
      for key, val in current_spark_config.items():
          if val is not None:
              hadoop_config.set(key, val)
          else:
              hadoop_config.unset(key)
  
imports: import json
  import logging
  import os
  from concurrent import futures
  from contextlib import contextmanager
  from operator import attrgetter
  from urllib.parse import urlparse
  from packaging import version
  from pyarrow import parquet
  from six.moves import cPickle
  from petastorm import utils
  from petastorm.etl.legacy import depickle_legacy_package_name_compatible
  from petastorm.fs_utils import FilesystemResolver, get_filesystem_and_path_or_paths, get_dataset_path
  from petastorm.unischema import Unischema
label_desc: Use image node_id 3 for calling a global function with example usage: _cleanup_spark(spark, current_spark_config, row_group_size_mb) without return types