code: def test_runner_nvidia_gpu(
      framework: types.ModuleType,
      test_model: FrameworkTestModel,
      saved_model: bentoml.Model,
  ):
      resource_cfg = {"nvidia.com/gpu": 1}
  
      ran_tests = False
      for config in test_model.configurations:
          model_with_options = saved_model.with_options(
              **config.load_kwargs
          )
  
          runnable: t.Type[bentoml.Runnable] = framework.get_runnable(
              model_with_options
          )
          if "nvidia.com/gpu" not in runnable.SUPPORTED_RESOURCES:
              continue
  
          ran_tests = True
  
          runner = Runner(runnable)
  
          for meth, inputs in config.test_inputs.items():
              strategy = DefaultStrategy()
  
              os.environ.update(
                  strategy.get_worker_env(runnable, resource_cfg, 1, 0)
              )
  
              runner.init_local()
  
              runner_handle = t.cast(
                  LocalRunnerRef, runner._runner_handle
              )
              runnable = runner_handle._runnable
  
              config.check_runnable(runnable, resource_cfg)
              if (
                  hasattr(runnable, "model")
                  and runnable.model is not None
              ):  # TODO: add a get_model to test models
                  config.check_model(runnable.model, resource_cfg)
  
              for inp in inputs:
                  outp = getattr(runner, meth).run(
                      *inp.input_args, **inp.input_kwargs
                  )
                  inp.check_output(outp)
  
              runner.destroy()
  
      if not ran_tests:
          pytest.skip(
              f"no configurations for model '{test_model.name}' supported running on Nvidia GPU"
          )
  
imports: from __future__ import annotations
  import logging
  import os
  import types
  import typing
  from typing import TYPE_CHECKING
  import pytest
  import bentoml
  from bentoml._internal.models.model import ModelContext
  from bentoml._internal.models.model import ModelSignature
  from bentoml._internal.runner.runner import Runner
  from bentoml._internal.runner.runner_handle.local import LocalRunnerRef
  from bentoml._internal.runner.strategy import DefaultStrategy
  from bentoml.exceptions import NotFound
  from .models import FrameworkTestModel
label_desc: Use image node_id 13 for calling a global function with example usage: test_runner_nvidia_gpu(framework, test_model, saved_model) without return types