def METHOD_NAME(excluded_device_ids):
    devices = []
    id_counter = 0
    for r in pci_records():
        if r.get("Vendor", "") == "NVIDIA Corporation" and r["Class"] in [
            "VGA compatible controller",
            "3D controller",
        ]:
            bus_id = "PCI:" + ":".join(
                map(lambda x: str(int(x, 16)), re.split(r"[:\.]", r["Slot"]))
            )
            if id_counter not in excluded_device_ids:
                devices.append(bus_id)
            id_counter += 1
    if not devices:
        print("Error: ai2thor-xorg requires at least one NVIDIA device")
        sys.exit(1)
    return devices