def METHOD_NAME(cls, string_or_stream: typing.Union[str, typing.IO]) -> 'SeverityRules':
    """Instantiates a new SeverityRules object from YAML rule definitions"""
    raw_data = yaml.safe_load(string_or_stream) or {}
    rules = cls._parse_raw_severity_rules(raw_data)
    return cls(rules)