code: def assert_datasource_protocol(event):
      
  
      assert event.type in DATASOURCE_TYPE
  
      # Done packets have no dt.
      if not event.type == DATASOURCE_TYPE.DONE:
          assert isinstance(event.dt, datetime)
          assert event.dt.tzinfo == pytz.utc
docs: Assert that an event meets the protocol for datasource outputs.