def METHOD_NAME(value: typing.Union[str, int]) -> SeverityModifier:
    """Parses a severity modifier expression and returns a modifier callable. The
    callable will take a severity value as an argument, and returns a modified severity
    value.
    """
    oper = None
    if isinstance(value, str):
        if value[0] in ("+", "-"):
            oper = value[0]
            value = int(value[1:])
    value = int(value)
    if oper == "+":
        return lambda x: x + value
    elif oper == "-":
        return lambda x: x - value
    else:
        return lambda x: Severity(value)