code: def create_event(self, register=False):
          
  
          event = asyncio.Event(loop=self._loop)
          if register:
              self._events.add(event)
  
          return event
docs: Create an asyncio.Event inside the emulation loop.
  
          This method exists as a convenience to create an Event object that is
          associated with the correct EventLoop().  If you pass register=True,
          then the event will be registered as an event that must be set for the
          EmulationLoop to be considered idle.  This means that whenever
          wait_idle() is called, it will block until this event is set.
  
          Examples of when you may want this behavior is when the event is
          signaling whether a tile has completed restarting itself.  The reset()
          rpc cannot block until the tile has initialized since it may need to
          send its own rpcs as part of the initialization process.  However, we
          want to retain the behavior that once the reset() rpc returns the tile
          has been completely reset.
  
          The cleanest way of achieving this is to have the tile set its
          self.initialized Event when it has finished rebooting and register
          that event so that wait_idle() nicely blocks until the reset process
          is complete.
  
          Args:
              register (bool): Whether to register the event so that wait_idle
                  blocks until it is set.
  
          Returns:
              asyncio.Event: The Event object.