def METHOD_NAME(self, id_str):
    if not re.match('^([\#@\%]\d+|\*)$', id_str):
        raise Exception("ID string '{}' malformed".format(id_str))
    users_value = 0
    if id_str[0] == "#":
        value = USERS["UID"]
        users_value = int(id_str[1:]) + value
    if id_str[0] == "@":
        value = USERS["GID"]
        users_value = int(id_str[1:]) + value
    if id_str[0] == "*":
        users_value = USERS["ALL"]
    if id_str[0] == "%":
        value = USERS["CLUSTER"]
        users_value = int(id_str[1:]) + value
    return users_value