class_docstr: Tests various failure-modes, making sure we produce meaningful errmsgs.
docstr: Tests errors related to no-GPU/too-few GPUs/etc.
  
  This test will only work ok on a CPU-only machine.
code: def test_no_gpus_error(self):
      """Tests errors related to no-GPU/too-few GPUs/etc.
  
      This test will only work ok on a CPU-only machine.
      """
  
      config = impala.ImpalaConfig().environment("CartPole-v1")
  
      for _ in framework_iterator(config):
          self.assertRaisesRegex(
              RuntimeError,
              # (?s): "dot matches all" (also newlines).
              "(?s)Found 0 GPUs on your machine.+To change the config",
              lambda: config.build(),
          )
  
file_path: ray/python/ray/rllib/utils/tests/test_errors.py
imports: import unittest
  import ray
  import ray.rllib.algorithms.impala
  import ray.rllib.algorithms.ppo
  from ray.rllib.utils.error import EnvError
  from ray.rllib.utils.test_utils import framework_iterator
label_desc: Use image node_id 3 for calling the TestErrors obj's underlying member method code with example usage: obj.test_no_gpus_error() without return types