class_docstr: Directive to describe a class, function or similar object.  Not used
  directly, but subclassed (in domain-specific directives) to add custom
  behavior.
class_docstr_tok: ["Directive","to","describe","a","class",",","function","or","similar","object",".","Not","used","directly",",","but","subclassed","(","in","domain-specific","directives",")","to","add","custom","behavior","."]
code: def get_field_type_map(self) -> dict[str, tuple[Field, bool]]:
      if self._doc_field_type_map == {}:
          self._doc_field_type_map = {}
          for field in self.doc_field_types:
              for name in field.names:
                  self._doc_field_type_map[name] = (field, False)
  
              if field.is_typed:
                  typed_field = cast(TypedField, field)
                  for name in typed_field.typenames:
                      self._doc_field_type_map[name] = (field, True)
  
      return self._doc_field_type_map
  
imports: from __future__ import annotations
  import re
  from typing import TYPE_CHECKING, Any, Generic, TypeVar, cast
  from docutils import nodes
  from docutils.parsers.rst import directives, roles
  from sphinx import addnodes
  from sphinx.addnodes import desc_signature
  from sphinx.util import docutils
  from sphinx.util.docfields import DocFieldTransformer, Field, TypedField
  from sphinx.util.docutils import SphinxDirective
  from sphinx.util.nodes import nested_parse_with_titles
  from sphinx.util.typing import OptionSpec
label_desc: Use image node_id 1 for calling the ObjectDescription obj's underlying member method code with example usage: obj.get_field_type_map() and returns: self