docs: def create_event_handler(event_type, handler):
      """Register a comm and return a serializable object with target name"""
  
      target_name = '{hash}_{event_type}'.format(hash=hash(handler), event_type=event_type)
  
      def handle_comm_opened(comm, msg):
          @comm.on_msg
          def _handle_msg(msg):
              data = msg['content']['data']
              event = json.loads(data)
              return_value = handler(event)
              if return_value:
                  comm.send(return_value)
  
          comm.send('Comm target "{target_name}" registered by vdom'.format(target_name=target_name))
  
      # Register a new comm for this event handler
      if get_ipython():
          get_ipython().kernel.comm_manager.register_target(target_name, handle_comm_opened)
  
      # Return a serialized object
      return target_name