code: def create_domains(self, env: BuildEnvironment) -> Iterator[Domain]:
      for DomainClass in self.domains.values():
          domain = DomainClass(env)
  
          # transplant components added by extensions
          domain.directives.update(
              self.domain_directives.get(domain.name, {})
          )
          domain.roles.update(self.domain_roles.get(domain.name, {}))
          domain.indices.extend(
              self.domain_indices.get(domain.name, [])
          )
          for name, objtype in self.domain_object_types.get(
              domain.name, {}
          ).items():
              domain.add_object_type(name, objtype)
  
          yield domain
  
imports: from __future__ import annotations
  import sys
  import traceback
  from importlib import import_module
  from types import MethodType
  from typing import TYPE_CHECKING, Any, Callable
  from sphinx.domains import Domain, Index, ObjType
  from sphinx.domains.std import GenericObject, Target
  from sphinx.errors import ExtensionError, SphinxError, VersionRequirementError
  from sphinx.extension import Extension
  from sphinx.io import create_publisher
  from sphinx.locale import __
  from sphinx.parsers import Parser
  from sphinx.roles import XRefRole
  from sphinx.util import logging
  from sphinx.util.logging import prefixed_warnings
label_desc: Use image node_id 7 for calling the SphinxComponentRegistry obj's underlying member method code with example usage: obj.create_domains(env) without return types