code: def test_job_environment_raises_outside_of_job() -> None:
      with pytest.raises(
          RuntimeError, match=r"which environment.*slurm.*local.*debug"
      ):
          plugins.get_job_environment()
  
imports: import logging
  import re
  import typing
  from pathlib import Path
  import pkg_resources
  import pytest
  from .None import core, plugins
  from .job_environment import JobEnvironment
label_desc: Use image node_id 6 for calling a global function with example usage: test_job_environment_raises_outside_of_job() without return types