def METHOD_NAME(self, device):
    """Event handler that is called when a device is discovered."""
    # We're only interested if this is a flight stick and we don't have a
    # flight stick yet.
    if device.device_class == InputDevice.DeviceClass.flight_stick and not self.flightStick:
        print("Found %s" % (device))
        self.flightStick = device
        # Enable this device to ShowBase so that we can receive events.
        # We set up the events with a prefix of "flight_stick0-".
        self.attachInputDevice(device, prefix="flight_stick0")
        # Hide the warning that we have no devices.
        self.lblWarning.hide()