code: def set_server_callback(self, handle):
          
          if self.on_events:
              for event in self.on_events:
                  handle.on_event(event, self.on_event)
          if self.on_changes:
              for change in self.on_changes:
                  if change in ['patching', 'streaming']:
                      # Patch and stream events do not need handling on server
                      continue
                  handle.on_change(change, self.on_change)
docs: Set up on_change events for bokeh server interactions.