code: def test_bentoml_configuration_runner_override(
      container_from_file: t.Callable[[str], ConfigDictType],
      version: int | None,
  ):
      OVERRIDE_RUNNERS = f"""\
  {'version: %d' % version if version else ''}
  runners:
      batching:
          enabled: False
          max_batch_size: 10
      resources:
          cpu: 4
      workers_per_resource: 1
      logging:
          access:
              enabled: False
      test_runner_1:
          resources: system
          workers_per_resource: 2
      test_runner_2:
          resources:
              cpu: 2
          workers_per_resource: 4
      test_runner_gpu:
          resources:
              nvidia.com/gpu: 1
      test_runner_batching:
          batching:
              enabled: True
          logging:
              access:
                  enabled: True
  """
  
      bentoml_cfg = container_from_file(OVERRIDE_RUNNERS)
      runner_cfg = bentoml_cfg["runners"]
  
      # test_runner_1
      test_runner_1 = runner_cfg["test_runner_1"]
      assert test_runner_1["batching"]["enabled"] is False
      assert test_runner_1["batching"]["max_batch_size"] == 10
      assert test_runner_1["logging"]["access"]["enabled"] is False
      assert test_runner_1["workers_per_resource"] == 2
      # assert test_runner_1["resources"]["cpu"] == 4
  
      # test_runner_2
      test_runner_2 = runner_cfg["test_runner_2"]
      assert test_runner_2["batching"]["enabled"] is False
      assert test_runner_2["batching"]["max_batch_size"] == 10
      assert test_runner_2["logging"]["access"]["enabled"] is False
      assert test_runner_2["resources"]["cpu"] == 2
      assert test_runner_2["workers_per_resource"] == 4
  
      # test_runner_gpu
      test_runner_gpu = runner_cfg["test_runner_gpu"]
      assert test_runner_gpu["batching"]["enabled"] is False
      assert test_runner_gpu["batching"]["max_batch_size"] == 10
      assert test_runner_gpu["logging"]["access"]["enabled"] is False
      assert (
          test_runner_gpu["resources"]["cpu"] == 4
      )  # should use global
      assert test_runner_gpu["resources"]["nvidia.com/gpu"] == 1
      assert test_runner_gpu["workers_per_resource"] == 1
  
      # test_runner_batching
      test_runner_batching = runner_cfg["test_runner_batching"]
      assert test_runner_batching["batching"]["enabled"] is True
      assert test_runner_batching["batching"]["max_batch_size"] == 10
      assert (
          test_runner_batching["logging"]["access"]["enabled"] is True
      )
      assert test_runner_batching["resources"]["cpu"] == 4
  
file_path: BentoML/tests/unit/_internal/configuration/test_containers.py
imports: from __future__ import annotations
  import typing
  from typing import TYPE_CHECKING
  import pytest
  from bentoml.exceptions import BentoMLConfigException
label_desc: Use image node_id 3 for calling a global function with example usage: test_bentoml_configuration_runner_override(container_from_file, version) without return types