code: def check_on_gpu(pipeline):
      """
      Check that the processors are all on the GPU and that basic execution works
      """
      if not torch.cuda.is_available():
          warnings.warn(
              "Unable to run the test that checks the pipeline is on the GPU, as there is no GPU available!"
          )
          return
  
      for name, proc in pipeline.processors.items():
          if proc.trainer is not None:
              device = next(proc.trainer.model.parameters()).device
          else:
              device = next(proc._model.parameters()).device
  
          assert str(device).startswith("cuda"), (
              "Processor %s was not on the GPU" % name
          )
  
      # just check that there are no cpu/cuda tensor conflicts
      # when running on the GPU
      pipeline("This is a small test")
  
imports: import warnings
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: check_on_gpu(pipeline) without return types