code: def gen_submit_args(
      driver_cores,
      driver_memory,
      num_executors,
      executor_cores,
      executor_memory,
      extra_python_lib=None,
      jars=None,
  ):
      submit_args = (
          " --driver-cores {} --driver-memory {} --num-executors {}"
          " --executor-cores {} --executor-memory {}".format(
              driver_cores,
              driver_memory,
              num_executors,
              executor_cores,
              executor_memory,
          )
      )
      if extra_python_lib:
          submit_args = submit_args + " --py-files {}".format(
              extra_python_lib
          )
      if jars:
          submit_args = submit_args + " --jars {}".format(jars)
      return submit_args
  
file_path: analytics-zoo/pyzoo/zoo/util/spark.py
imports: import os
  import platform
  from pyspark import SparkContext
  from zoo import init_nncontext, init_spark_conf
  from zoo.util.utils import detect_python_location, pack_penv
  from zoo.util.utils import get_executor_conda_zoo_classpath, get_zoo_bigdl_classpath_on_driver
label_desc: Use image node_id 1 for calling a global function with example usage: gen_submit_args(driver_cores, driver_memory, num_executors, executor_cores, executor_memory, extra_python_lib, jars) and returns: submit_args