def _extract(self, attribute) -> str:
attr_data = self.journey.JourneyAttributeList.JourneyAttribute[<EOL>self.attr_types.index(attribute)<EOL>].Attribute<EOL>attr_variants = attr_data.xpath("<STR_LIT>")<EOL>data = attr_data.AttributeVariant[attr_variants.index("<STR_LIT>")].Text.pyval<EOL>return str(data)<EOL>
Extract train information.