code: def init_env(conf):
      # Default env
      kmp_affinity = "granularity=fine,compact,1,0"
      kmp_settings = "1"
      omp_num_threads = "1"
      kmp_blocktime = "0"
  
      # Check env and override if necessary
      # Currently, focused on ZOO_NUM_MKLTHREADS,
      # OMP_NUM_THREADS, KMP_BLOCKTIME, KMP_AFFINITY
      # and KMP_SETTINGS
      if "KMP_AFFINITY" in os.environ:
          kmp_affinity = os.environ["KMP_AFFINITY"]
      if "KMP_SETTINGS" in os.environ:
          kmp_settings = os.environ["KMP_SETTINGS"]
      if "ZOO_NUM_MKLTHREADS" in os.environ:
          if os.environ["ZOO_NUM_MKLTHREADS"].lower() == "all":
              omp_num_threads = conf.get(
                  "spark.executor.cores",
                  str(multiprocessing.cpu_count()),
              )
          else:
              omp_num_threads = os.environ["ZOO_NUM_MKLTHREADS"]
      elif "OMP_NUM_THREADS" in os.environ:
          omp_num_threads = os.environ["OMP_NUM_THREADS"]
      if "KMP_BLOCKTIME" in os.environ:
          kmp_blocktime = os.environ["KMP_BLOCKTIME"]
  
      # Set env
      conf.set("spark.executorEnv.KMP_AFFINITY", kmp_affinity)
      conf.set("spark.executorEnv.KMP_SETTINGS", kmp_settings)
      conf.set("spark.executorEnv.KMP_BLOCKTIME", kmp_blocktime)
      conf.set("spark.executorEnv.OMP_NUM_THREADS", omp_num_threads)
      os.environ["KMP_AFFINITY"] = kmp_affinity
      os.environ["KMP_SETTINGS"] = kmp_settings
      os.environ["OMP_NUM_THREADS"] = omp_num_threads
      os.environ["KMP_BLOCKTIME"] = kmp_blocktime
  
imports: from bigdl.util.common import *
  from zoo.common.utils import callZooFunc
  from zoo.util.utils import set_python_home
  import warnings
  import multiprocessing
  import os
  import threading
  import sys
label_desc: Use image node_id 10 for calling a global function with example usage: init_env(conf) without return types