src/transformers/models/markuplm/feature_extraction_markuplm.py/MarkupLMFeatureExtractor/construct_xpath
class MarkupLMFeatureExtractor:    def construct_xpath(self, xpath_tags, xpath_subscripts):
        xpath = ""
        for tagname, subs in zip(xpath_tags, xpath_subscripts):
            xpath += f"/{tagname}"
            if subs != 0:
                xpath += f"[{subs}]"
        return xpath