! Get a dict, USBID -> device, for a device class
        @param device_type The type of devices to search. For exmaple, "serial"
          looks for all serial devices connected to this computer
        @return A dict: Device USBID -> device file in /dev

def _dev_by_id(self, device_type):
        """! Get a dict, USBID -> device, for a device class
        @param device_type The type of devices to search. For exmaple, "serial"
          looks for all serial devices connected to this computer
        @return A dict: Device USBID -> device file in /dev
        """
        dir = os.path.join("/dev", device_type, "by-id")
        if os.path.isdir(dir):
            to_ret = dict(
                self._hex_ids([os.path.join(dir, f) for f in os.listdir(dir)])
            )
            return to_ret
        else:
            logger.error(
                "Could not get %s devices by id. "
                "This could be because your Linux distribution "
                "does not use udev, or does not create /dev/%s/by-id "
                "symlinks. Please submit an issue to github.com/"
                "armmbed/mbed-ls.",
                device_type,
                device_type,
            )
            return {}