class_docstr: Tests the RAY_JOB_SUBMIT_HOOK env var.
class_docstr_tok: ["Tests","the","RAY_JOB_SUBMIT_HOOK","env","var","."]
code: def test_hook(self, ray_start_stop):
      with set_env_var(
          "RAY_JOB_SUBMIT_HOOK", "ray._private.test_utils.job_hook"
      ):
          stdout, _ = _run_cmd("ray job submit -- echo hello")
          assert "hook intercepted: echo hello" in stdout
  
imports: from contextlib import contextmanager
  import ray
  import json
  import os
  import logging
  import sys
  import subprocess
  from typing import Optional, Tuple
  import pytest
label_desc: Use image node_id 1 for calling the TestJobSubmitHook obj's underlying member method code with example usage: obj.test_hook(ray_start_stop) without return types