'Extract warning messages corresponding to warntype.
The warntypes can be all keys of the _warning_pattern_map dictionary.
@param warntype: The type of warning message that should be extracted.
@type warntype: str
@return a list of warning messages
@rtype list'

def byType(self, warntype):

    return [x for x in self.warning_lines if re.search(self._warning_pattern_map[warntype], x)]
