code: def _parse_device_path(self, device_path, char_path_override=None):
          
  
          # 1. Make sure that we can parse the device path.
          try:
              device_type = device_path.rsplit('-', 1)[1]
          except IndexError:
              warn("The following device path was skipped as it could "
                   "not be parsed: %s" % device_path, RuntimeWarning)
              return
  
          # 2. Make sure each device is only added once.
          realpath = os.path.realpath(device_path)
          if realpath in self._raw:
              return
          self._raw.append(realpath)
  
          # 3. All seems good, append the device to the relevant list.
          if device_type == 'kbd':
              self.keyboards.append(Keyboard(self, device_path,
                                             char_path_override))
          elif device_type == 'mouse':
              self.mice.append(Mouse(self, device_path,
                                     char_path_override))
          elif device_type == 'joystick':
              self.gamepads.append(GamePad(self,
                                           device_path,
                                           char_path_override))
          else:
              self.other_devices.append(OtherDevice(self,
                                                    device_path,
                                                    char_path_override))
docs: Parse each device and add to the approriate list.