code: def _create(
      self, kind: DriverKind | None, scale_factor: float = 1
  ) -> WebDriver:
      driver_kind = kind or self.kind
  
      if driver_kind is None:
          driver = _try_create_chromium_webdriver(
              scale_factor=scale_factor
          )
          if driver is not None:
              self.kind = "chromium"
              return driver
  
          driver = _try_create_firefox_webdriver(
              scale_factor=scale_factor
          )
          if driver is not None:
              self.kind = "firefox"
              return driver
  
          raise RuntimeError(
              "Neither firefox and geckodriver nor a variant of chromium browser and "
              "chromedriver are available on system PATH. You can install the former "
              "with 'conda install -c conda-forge firefox geckodriver'."
          )
      elif driver_kind == "chromium":
          return create_chromium_webdriver(scale_factor=scale_factor)
      elif driver_kind == "firefox":
          return create_firefox_webdriver(scale_factor=scale_factor)
      else:
          raise ValueError(
              f"'{driver_kind}' is not a recognized webdriver kind"
          )
  
imports: from __future__ import annotations
  import logging
  from ..util.dependencies import import_required
  import atexit
  import os
  from os.path import devnull
  from shutil import which
  from typing import TYPE_CHECKING, Literal
  from packaging.version import Version
  from ..settings import settings
label_desc: Use image node_id 6 for calling the _WebdriverState obj's underlying member method code with example usage: obj._create(kind, scale_factor) and returns: driver, driver, create_chromium_webdriver, create_firefox_webdriver