code: def test_grabgpus3():
      pop_if_set()
      res = grab_gpus(100)
      assert len(os.environ["CUDA_VISIBLE_DEVICES"]) < len(
          ",".join([str(x) for x in range(100)])
      )
      nvmlInit()
      assert res <= nvmlDeviceGetCount()
      nvmlShutdown()
  
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 5 for calling a global function with example usage: test_grabgpus3() without return types