code: def test_method_exit_and_raise_no_over_retry(shutdown_only):
      """
      Test we can endure a mix of raises and exits. Note the number of exits we can endure
      is subject to max_restarts.
      """
      counter = Counter.remote()
      trouble_maker = TroubleMaker.options(max_restarts=1).remote()
      with pytest.raises(MyError):
          assert ray.get(
              trouble_maker.raise_or_exit.options(
                  _max_retries=2
              ).remote(counter, ["exit", "raise", "raise"])
          )
      assert ray.get(counter.get_count.remote()) == 3
  
imports: import os
  import sys
  import pytest
  import ray
label_desc: Use image node_id 10 for calling a global function with example usage: test_method_exit_and_raise_no_over_retry(shutdown_only) without return types