def METHOD_NAME(self, value):
    # checks DoS thresholds for being either a single int or a series of two concatenated integers
    # separated by semicolon and returns either the (sanitized) value or zero.
    if value is not None:
        x, _, y = value.partition(";")
        try:
            _ = int(x)
        except ValueError:
            logger.error(
                "SNMP invalid evasion threshold: '%s'. Assuming no DoS evasion.",
                value,
            )
            # first value is invalid, ignore the whole setting.
            return "0;0"
        try:
            _ = int(y)
            # both values are fine.
            return value
        except ValueError:
            # second value is invalid, use the first and ignore the second.
            return str(x) + ";0"
    else:
        return "0;0"