code: def test_job_environment(tmp_path: Path) -> None:
      executor = debug.DebugExecutor(tmp_path)
  
      def use_env():
          env = JobEnvironment()
          assert env.num_nodes == 1
          assert env.num_tasks == 1
          assert env.node == 0
          assert env.global_rank == 0
          assert env.local_rank == 0
          assert "DEBUG" in env.job_id
  
      job = executor.submit(use_env)
      job.result()
      # Check that we clean up the env after us.
      assert "SUBMITIT_DEBUG_JOB_ID" not in os.environ
  
file_path: submitit/submitit/local/test_debug.py
imports: import functools
  import os
  from pathlib import Path
  from typing import Any, Tuple
  import pytest
  from ..core import utils
  from ..core.core import Job
  from ..core.job_environment import JobEnvironment
  from .None import debug
label_desc: Use image node_id 8 for calling a global function with example usage: test_job_environment(tmp_path) without return types