def _extract(self, raw: str, station: str = None) -> str:
resp = parsexml(raw)<EOL>try:<EOL><INDENT>report = resp['<STR_LIT>']['<STR_LIT:body>']['<STR_LIT>']['<STR_LIT>'][self.rtype.lower() + '<STR_LIT>']<EOL><DEDENT>except KeyError:<EOL><INDENT>raise self.make_err(raw)<EOL><DEDENT>report = report.replace('<STR_LIT:\n>', '<STR_LIT>')<EOL>for item in (self.rtype.upper(), '<STR_LIT>'):<EOL><INDENT>if report.startswith(item + '<STR_LIT:U+0020>'):<EOL><INDENT>report = report[len(item) + <NUM_LIT:1>:]<EOL><DEDENT><DEDENT>report = report.rstrip('<STR_LIT:=>')<EOL>return '<STR_LIT:U+0020>'.join(report.split())<EOL>
Extracts the report message from XML response