code: def _usage_id_from_node(self, node, parent_id, id_generator=None):
          
          if id_generator is not None:
              warnings.warn(
                  "Passing an id_generator directly is deprecated "
                  "in favor of constructing the Runtime with the id_generator",
                  DeprecationWarning,
                  stacklevel=3,
              )
  
          id_generator = id_generator or self.id_generator
  
          block_type = node.tag
          # remove xblock-family from elements
          node.attrib.pop('xblock-family', None)
          # TODO: a way for this node to be a usage to an existing definition?
          def_id = id_generator.create_definition(block_type)
          usage_id = id_generator.create_usage(def_id)
          keys = ScopeIds(None, block_type, def_id, usage_id)
          block_class = self.mixologist.mix(self.load_block_type(block_type))
          # pull the asides out of the xml payload
          aside_children = []
          for child in node.iterchildren():
              # get xblock-family from node
              xblock_family = child.attrib.pop('xblock-family', None)
              if xblock_family:
                  xblock_family = self._family_id_to_superclass(xblock_family)
                  if issubclass(xblock_family, XBlockAside):
                      aside_children.append(child)
          # now process them & remove them from the xml payload
          for child in aside_children:
              self._aside_from_xml(child, def_id, usage_id, id_generator)
              node.remove(child)
          block = block_class.parse_xml(node, self, keys, id_generator)
          block.parent = parent_id
          block.save()
          return usage_id
docs: Create a new usage id from an XML dom node.
  
          Args:
              node (lxml.etree.Element): The DOM node to interpret.
              parent_id: The usage ID of the parent block
              id_generator (IdGenerator): The :class:`.IdGenerator` to use
                  for creating ids