code: async def wait(self, timeout=None):
          '''
          Wait for the required number of events and return them or None on timeout.
  
          Example:
  
              evnts = waiter.wait(timeout=30)
  
              if evnts == None:
                  handleTimedOut()
                  return
  
              for evnt in evnts:
                  doStuff(evnt)
  
          '''
          try:
  
              retn = await s_coro.event_wait(self.event, timeout)
              if not retn:
                  return None
  
              return self.events
  
          finally:
              self.fini(ync def wait(self, timeout=None):
          '''
          Wait for the required number of events and return them or None on timeout.
  
          Example:
  
              evnts = waiter.wait(timeout=30)
  
              if evnts == None:
                  handleTimedOut()
                  return
  
              for evnt in evnts:
                  doStuff(evnt)
  
          '''
          try:
  
              retn = await s_coro.event_wait(self.event, timeout)
              if not retn:
                  return None
  
              return self.events
  
          finally:
              self.fini()
docs: Wait for the required number of events and return them or None on timeout.
  
          Example:
  
              evnts = waiter.wait(timeout=30)
  
              if evnts == None:
                  handleTimedOut()
                  return
  
              for evnt in evnts:
                  doStuff(evnt)