<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _match_device(self):
 """If the LED is connected to an input device, associate the objects."""

        for device in self.manager.all_devices:
            if (device.get_char_device_path() ==
                    self._character_device_path):
                self.device = device
                device.leds.append(self)
                break