def METHOD_NAME():
    global controllers
    global controller_guids
    # Check for duplicates
    for entry in controllers:
        entry_id = entry[1] + entry[3]
        if (entry_id in controller_guids and entry_id not in conditionals):
            current_name = entry[2]
            existing_name = controller_guids[entry_id][2]
            print("Warning: entry '%s' is duplicate of entry '%s'" % (current_name, existing_name))
            if (not current_name.startswith("(DUPE)")):
                entry[2] = f"(DUPE) {current_name}"
            if (not existing_name.startswith("(DUPE)")):
                controller_guids[entry_id][2] = f"(DUPE) {existing_name}"
        controller_guids[entry_id] = entry
    for entry in sorted(controllers, key=lambda entry: f"{entry[2]}-{entry[1]}"):
        line = "".join(entry) + "\n"
        line = line.replace("\t", "    ")
        if not line.endswith(",\n") and not line.endswith("*/\n") and not line.endswith(",\r\n") and not line.endswith("*/\r\n"):
            print("Warning: '%s' is missing a comma at the end of the line" % (line))
        output.write(line)
    controllers = []
    controller_guids = {}