code: def extract(self, node, docname):
      is_global = False
      entities = []
  
      language = None
      for node in node.children:
          if language is None and node.tagname != "paragraph":
              raise Exception(
                  f"Expected language name:\n.. entities:: <LANGUAGE>"
              )
          elif language is None and node.tagname == "paragraph":
              language = str(node.children[0])
              if language not in LANGUAGES:
                  raise Exception(
                      f'Unknown language "{language}. Might be missing a newline after language"'
                  )
          elif node.tagname == "field_list":
              is_global = self._extract_global(node.children)
          elif node.tagname == "definition_list":
              entities.extend(self._extract_entities(node.children))
          else:
              raise Exception(
                  f"Expected a list of terms/options, found {node.tagname}"
              )
  
      self._add_entities(entities, language, is_global, docname)
  
imports: from collections import defaultdict, abc
  from typing import cast
  from docutils import nodes
  from docutils.parsers.rst import Directive
  import sphinx
  from sphinx.locale import _
  from sphinx.util.docutils import SphinxDirective
  from sphinx.errors import ExtensionError
  from conf import languages
label_desc: Use image node_id 10 for calling the AllEntities obj's underlying member method code with example usage: obj.extract(node, docname) without return types