def METHOD_NAME(user, data):
    data[user["name"]] = "Invalid User"
    for g in user["groups"]:
        if g["name"] == "editbugs" or g["name"] == "canconfirm":
            data[user["name"]] = user["nick"]