code: def _finalize(self):
      RUNNER_CFG_KEYS = [
          "batching",
          "resources",
          "logging",
          "metrics",
          "traffic",
          "workers_per_resource",
      ]
      global_runner_cfg = {
          k: self.config["runners"][k] for k in RUNNER_CFG_KEYS
      }
      custom_runners_cfg = dict(
          filter(
              lambda kv: kv[0] not in RUNNER_CFG_KEYS,
              self.config["runners"].items(),
          )
      )
      if custom_runners_cfg:
          for runner_name, runner_cfg in custom_runners_cfg.items():
              # key is a runner name
              if runner_cfg.get("resources") == "system":
                  runner_cfg["resources"] = system_resources()
              self.config["runners"][runner_name] = config_merger.merge(
                  deepcopy(global_runner_cfg),
                  runner_cfg,
              )
      expand_env_var_in_values(self.config)
  
imports: from __future__ import annotations
  import logging
  import math
  import os
  import typing
  import uuid
  from copy import deepcopy
  from dataclasses import dataclass
  from pathlib import Path
  from typing import TYPE_CHECKING
  import schema
  import yaml
  from deepmerge.merger import Merger
  from simple_di import Provide
  from simple_di import providers
  from ...exceptions import BentoMLConfigException
  from ..context import component_context
  from ..context import trace_context
  from ..resource import CpuResource
  from ..resource import system_resources
  from ..utils import split_with_quotes
  from ..utils import validate_or_create_dir
  from ..utils.unflatten import unflatten
  from .None import expand_env_var
  from .helpers import expand_env_var_in_values
  from .helpers import flatten_dict
  from .helpers import get_default_config
  from .helpers import import_configuration_spec
  from .helpers import load_config_file
label_desc: Use image node_id 2 for calling the BentoMLConfiguration obj's underlying member method code with example usage: obj._finalize() without return types