code: def main():
      """Entry point of bigdl-submit command line tool."""
      args = _parse_args()
  
      app_id = str(uuid4())[:7]
  
      config.load_config()
  
      v1 = client.CoreV1Api()
  
      driver_pod_name = f"bigdl-{app_id}-driver"
      driver_pod_labels = {
          "bigdl-app": app_id,
          "bigdl-app-type": "driver",
      }
  
      service_name, service_port = _create_driver_service(
          v1_api=v1,
          namespace=args.namespace,
          driver_pod_name=driver_pod_name,
          driver_pod_labels=driver_pod_labels,
          driver_port=args.driver_port,
      )
      if args.submit_pod_template:
          template_json_str = _get_json_str_from_yaml_file(
              args.main_script
          )
          command = None
      else:
          template_json_str = None
          command = ["python", args.main_script] + args.main_script_args
  
      create_pod_fn = functools.partial(
          _create_pod,
          world_size=args.nnodes,
          driver_addr=service_name,
          driver_port=service_port,
          app_id=app_id,
          extra_envs=args.env,
          labels=args.node_label,
          pod_cpu=args.pod_cpu,
          pod_memory=args.pod_memory,
          pod_epc_memory=args.pod_epc_memory,
          image=args.image,
          command=command,
          use_command=args.use_command,
          sgx_enabled=args.sgx_enabled,
          volume_strs=args.volume,
          volume_mount_strs=args.volume_mount,
          pod_file_template_str=template_json_str,
      )
  
      _create_driver_pod(
          v1_api=v1,
          namespace=args.namespace,
          pod_name=driver_pod_name,
          pod_labels=driver_pod_labels,
          create_pod_fn=create_pod_fn,
      )
  
      _create_worker_pods(
          v1_api=v1,
          namespace=args.namespace,
          world_size=args.nnodes,
          app_id=app_id,
          create_pod_fn=create_pod_fn,
      )
  
      print(
          "You can use the following commands to check out the pods status and logs."
      )
      print(f"**** kubectl get pods -l bigdl-app={app_id} ****")
      print(f"**** kubectl logs {driver_pod_name} ****")
  
imports: from uuid import uuid4
  from kubernetes import client, config
  from kubernetes.client import ApiClient
  from argparse import REMAINDER, ArgumentParser
  import functools
  from typing import Dict, List, Callable, Optional
  import yaml
  import json
  from os import path
  from bigdl.nano.utils.common import invalidInputError
label_desc: Use image node_id 11 for calling a global function with example usage: main() without return types