def METHOD_NAME(self, proxy, sender_name, signal_name, parameters):
    # Wait until the service is ready
    if proxy.props.g_name_owner is None:
        return
    objects = parameters.unpack()
    if signal_name == "InterfacesAdded":
        for object_path, props in objects.items():
            props = props["org.gnome.Shell.Extensions.GSConnect.Device"]
            self.devices[object_path] = (
                props["Name"],
                Gio.DBusActionGroup.get(
                    proxy.get_connection(), SERVICE_NAME, object_path
                ),
            )
    elif signal_name == "InterfacesRemoved":
        for object_path in objects:
            try:
                del self.devices[object_path]
            except KeyError:
                pass