code: def assert_datasource_protocol(event):
      """Assert that an event meets the protocol for datasource outputs."""
  
      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
  
file_path: catalyst/catalyst/gens/utils.py
imports: import pytz
  import numbers
  from hashlib import md5
  from datetime import datetime
  from catalyst.protocol import DATASOURCE_TYPE
  from six import iteritems, b
label_desc: Use image node_id 2 for calling a global function with example usage: assert_datasource_protocol(event) without return types