def Merge(self, block, namespace=None):
    typ = block.locals.get('type')

    # This block doesn't want to be spoken to.
    if not typ:
      return
    # If the type still hasn't been set, it never will be.
    if typ is True:
      raise error.AmbiguousBlock

    block.Local(namespace=namespace)
    # Consume module-level metadata
    if 'order' in block.globals:
      if self.order is not None:
        raise error.RedundantControl('order')
      self.order = block.globals['order']
    self.plugin.Merge(block)

    # Sections and Backmatter are specially treated.
    block_id = block.locals.get('id')
    if typ == vimdoc.SECTION:
      # Overwrite existing section if it's a default.
      if block_id not in self.sections or self.sections[block_id].IsDefault():
        self.sections[block_id] = block
      elif not block.IsDefault():
        # Tried to overwrite explicit section with explicit section.
        raise error.DuplicateSection(block_id)
    elif typ == vimdoc.BACKMATTER:
      # Overwrite existing section backmatter if it's a default.
      if (block_id not in self.backmatters
          or self.backmatters[block_id].IsDefault()):
        self.backmatters[block_id] = block
      elif not block.IsDefault():
        # Tried to overwrite explicit backmatter with explicit backmatter.
        raise error.DuplicateBackmatter(block_id)
    else:
      collection_type = self.plugin.GetCollectionType(block)
      if collection_type is not None:
        self.collections.setdefault(collection_type, []).append(block)
Merges a block with the module.
dataset/ETHPy150Open google/vimdoc/vimdoc/module.py/Module.Merge