def get_status(self, xmlresult, xml):
        """Gets the status code of T1 XML.

        If code is valid, returns None; otherwise raises the appropriate Error.
        """
        status = xmlresult.find('status')
        if status is None:
            raise T1Error(None, xml)
        status_code = status.attrib['code']
        message = status.text

        try:
            exc = STATUS_CODES[status_code]
        except __HOLE__:
            self.status_code = False
            raise T1Error(status_code, message)

        if exc is None:
            self.status_code = True
            return

        self.status_code = False
        if exc is True:
            message = self._parse_field_error(xmlresult)
            exc = ValidationError
        raise exc(code=status_code, content=message)
dataset/ETHPy150Open MediaMath/t1-python/terminalone/xmlparser.py/XMLParser.get_status