class_docstr: Constructs a MarkupLM feature extractor. This can be used to get a list of nodes and corresponding xpaths from HTML
  strings.
  
  This feature extractor inherits from [`~feature_extraction_utils.PreTrainedFeatureExtractor`] which contains most
  of the main methods. Users should refer to this superclass for more information regarding those methods.
code: def xpath_soup(self, element):
      xpath_tags = []
      xpath_subscripts = []
      child = element if element.name else element.parent
      for parent in child.parents:  # type: bs4.element.Tag
          siblings = parent.find_all(child.name, recursive=False)
          xpath_tags.append(child.name)
          xpath_subscripts.append(
              0
              if 1 == len(siblings)
              else next(
                  i for i, s in enumerate(siblings, 1) if s is child
              )
          )
          child = parent
      xpath_tags.reverse()
      xpath_subscripts.reverse()
      return xpath_tags, xpath_subscripts
  
file_path: transformers/src/transformers/models/markuplm/feature_extraction_markuplm.py
imports: import html
  from ...feature_extraction_utils import BatchFeature, FeatureExtractionMixin
  from ...utils import is_bs4_available, logging, requires_backends
label_desc: Use image node_id 2 for calling the MarkupLMFeatureExtractor obj's underlying member method code with example usage: obj.xpath_soup(element) and returns: xpath_tags,  xpath_subscripts