class_docstr: A Theme object.
  
  Args:
      name: The name of the theme as defined by its entrypoint.
      custom_dir: User defined directory for custom templates.
      static_templates: A list of templates to render as static pages.
  
  All other keywords are passed as-is and made available as a key/value mapping.
code: def __init__(
      self,
      name: str | None = None,
      *,
      custom_dir: str | None = None,
      static_templates: Collection[str] = (),
      locale: str | None = None,
      **user_config,
  ) -> None:
      self.name = name
      self._custom_dir = custom_dir
      _vars: dict[str, Any] = {"name": name, "locale": "en"}
      self.__vars = _vars
  
      # MkDocs provided static templates are always included
      package_dir = os.path.abspath(os.path.dirname(__file__))
      mkdocs_templates = os.path.join(package_dir, "templates")
      self.static_templates = set(os.listdir(mkdocs_templates))
  
      # Build self.dirs from various sources in order of precedence
      self.dirs = []
  
      if custom_dir is not None:
          self.dirs.append(custom_dir)
  
      if name:
          self._load_theme_config(name)
  
      # Include templates provided directly by MkDocs (outside any theme)
      self.dirs.append(mkdocs_templates)
  
      # Handle remaining user configs. Override theme configs (if set)
      self.static_templates.update(static_templates)
      _vars.update(user_config)
  
      # Validate locale and convert to Locale object
      if locale is None:
          locale = _vars["locale"]
      _vars["locale"] = localization.parse_locale(locale)
  
imports: from __future__ import annotations
  import logging
  import os
  import warnings
  from typing import Any, Collection, MutableMapping
  import jinja2
  import yaml
  from mkdocs import localization, utils
  from mkdocs.config.base import ValidationError
  from mkdocs.utils import templates
label_desc: Use image node_id 1 to create a new Theme object from inherited base classes: MutableMapping with example: obj = Theme(name)