code: def __init__(self, *args, **kwargs):
      cache_mem = kwargs.pop("cache_mem", None)
      self._spill_dirs = kwargs.pop("spill_dirs", None) or ()
      # set limits as 2*requests for worker replica defaulted.
      kwargs["limit_resources_ratio"] = kwargs.get(
          "limit_resources_ratio", 1.2
      )
      super().__init__(*args, **kwargs)
      self._cache_mem = calc_size_by_str(cache_mem, self._memory)
      self.add_env("MARS_CACHE_MEM_SIZE", self._cache_mem)
  
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 1 to create a new MarsWorkerSpecConfig object from inherited base classes: MarsReplicaSpecConfig with example: obj = MarsWorkerSpecConfig()