code: def build(self):
      if self._job_name is None:
          metadata = {"generateName": "mars-job-"}
      else:
          metadata = {"name": self._job_name}
  
      web_host = self._web_host
      if web_host is not None and "://" in web_host:
          web_host = urlparse(web_host).netloc
  
      return {
          "kind": "MarsJob",
          "metadata": metadata,
          "spec": _remove_nones(
              {
                  "workerMemoryTuningPolicy": _remove_nones(
                      {
                          "spillDirs": self._worker_config.spill_dirs,
                          "workerCacheSize": self._worker_config.cache_mem,
                      }
                  ),
                  "cleanPodPolicy": "None",
                  "webHost": web_host,
                  "marsReplicaSpecs": {
                      "Worker": self._worker_config.build(),
                      "Scheduler": self._scheduler_config.build(),
                      "WebService": self._web_config.build(),
                  },
              }
          ),
      }
  
imports: from urllib.parse import urlparse
  from ...utils import parse_readable_size, calc_size_by_str
  from ..kubernetes.config import ContainerEnvConfig
label_desc: Use image node_id 2 for calling the MarsJobConfig obj's underlying member method code with example usage: obj.build() and returns: dict