def _handle_registration(self, event_type, callback, remove):
        self._event_handlers[event_type].register_callback(callback,
                                                           remove=remove)
        event_callbacks = self._event_handlers[event_type].callbacks
        if (len(event_callbacks) and event_type not in self._listener_set):
            self._listener_set.add(event_type)
            message = {'task': 'listen', 'events': list(self._listener_set)}
            self._handle_outgoing_message(message)
dataset/ETHPy150Open plotly/plotly.py/plotly/widgets/graph_widget.py/GraphWidget._handle_registration/original