def METHOD_NAME(self, serial_ports):
    """Helper to identify serial ports (and scan for them)"""
    # First, find and add all new or changed keys
    for serial_port in list(serial_ports):
        if serial_port not in self._serial_port_list:
            self.addUSBOutputDeviceSignal.emit(serial_port)  # Hack to ensure its created in main thread
            continue
    self._serial_port_list = list(serial_ports)
    for port, device in self._usb_output_devices.items():
        if port not in self._serial_port_list:
            device.close()