def METHOD_NAME(file, json):
    is_tag = "\\tags\\" in file or "/tags/" in file
    if not is_tag:
        return
    if "optional" in json:
        optionals = json["optional"]
        if not "values" in json:
            json["values"] = []
        for opt in optionals:
            var = {}
            var["id"] = opt
            var["required"] = False
            json["values"].append(var)
        del json["optional"]