code: def test_grabgpus2():
      pop_if_set()
      res = grab_gpus(1)
      assert len(os.environ["CUDA_VISIBLE_DEVICES"]) > 0
      assert res == 1
  
file_path: py3nvml/tests/test_py3nvml.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from time import sleep
  from py3nvml.py3nvml import *
  import pytest
  from py3nvml.utils import grab_gpus, get_free_gpus
  import os
label_desc: Use image node_id 4 for calling a global function with example usage: test_grabgpus2() without return types