code: def test_supervisor_object():
      supervisor_config = MarsSupervisorsConfig(
          1,
          cpu=2,
          memory="10g",
          limit_resources=False,
          modules=["mars.test_mod"],
      )
      supervisor_config.add_simple_envs(dict(TEST_ENV="test_val"))
  
      supervisor_config_dict = supervisor_config.build()
      assert (
          supervisor_config_dict["metadata"]["name"] == "marssupervisor"
      )
      assert supervisor_config_dict["spec"]["replicas"] == 1
  
      container_dict = supervisor_config_dict["spec"]["template"][
          "spec"
      ]["containers"][0]
      assert (
          int(container_dict["resources"]["requests"]["memory"])
          == 10 * 1024**3
      )
  
      container_envs = dict(
          (p["name"], p) for p in container_dict["env"]
      )
      assert container_envs["TEST_ENV"]["value"] == "test_val"
      assert container_envs["MKL_NUM_THREADS"]["value"] == "2"
      assert container_envs["MARS_CPU_TOTAL"]["value"] == "2"
      assert (
          int(container_envs["MARS_MEMORY_TOTAL"]["value"])
          == 10 * 1024**3
      )
      assert (
          container_envs["MARS_LOAD_MODULES"]["value"]
          == "mars.test_mod"
      )
  
imports: from ..config import NamespaceConfig, RoleConfig, RoleBindingConfig, ServiceConfig, EmptyDirVolumeConfig, MarsSupervisorsConfig, MarsWorkersConfig
label_desc: Use image node_id 2 for calling a global function with example usage: test_supervisor_object() without return types