def METHOD_NAME(self, tags, name, value):
    ret = -1
    for tag in tags:
        if tag['name'] == name:
            if isinstance(value, str):
                if (tag['value'] == False and value.lower() == "false" or
                        tag['value'] == True and value.lower() == "true"):
                    ret = 0
            elif tag['value'] == int(value):
                ret = 0
            break
    return ret