class_docstr: Yields all events in event_list that match the given sid_filter.
  If no event_list is specified, generates an internal stream of events
  to filter.  Returns all events if filter is None.
  
  Configuration options:
  
  count  : integer representing number of trades
  sids   : list of values representing simulated internal sids
  start  : start date
  delta  : timedelta between internal events
  filter : filter to remove the sids
class_docstr_tok: ["Yields","all","events","in","event_list","that","match","the","given","sid_filter",".","If","no","event_list","is","specified",",","generates","an","internal","stream","of","events","to","filter",".","Returns","all","events","if","filter","is","None",".","Configuration","options",":","count",":","integer","representing","number","of","trades","sids",":","list","of","values","representing","simulated","internal","sids","start",":","start","date","delta",":","timedelta","between","internal","events","filter",":","filter","to","remove","the","sids"]
code: def __init__(self, env, trading_calendar, *args, **kwargs):
      # We shouldn't get any positional arguments.
      assert len(args) == 0
  
      self.env = env
      self.trading_calendar = trading_calendar
  
      # Default to None for event_list and filter.
      self.event_list = kwargs.get("event_list")
      self.filter = kwargs.get("filter")
      if self.event_list is not None:
          # If event_list is provided, extract parameters from there
          # This isn't really clean and ultimately I think this
          # class should serve a single purpose (either take an
          # event_list or autocreate events).
          self.count = kwargs.get("count", len(self.event_list))
          self.start = kwargs.get("start", self.event_list[0].dt)
          self.end = kwargs.get("end", self.event_list[-1].dt)
          self.delta = delta = kwargs.get("delta")
          if delta is None:
              self.delta = self.event_list[1].dt - self.event_list[0].dt
          self.concurrent = kwargs.get("concurrent", False)
  
          self.identifiers = kwargs.get(
              "sids", set(event.sid for event in self.event_list)
          )
          assets_by_identifier = {}
          for identifier in self.identifiers:
              assets_by_identifier[
                  identifier
              ] = env.asset_finder.lookup_generic(
                  identifier, datetime.now()
              )[
                  0
              ]
          self.sids = [
              asset.sid for asset in list(assets_by_identifier.values())
          ]
          for event in self.event_list:
              event.sid = assets_by_identifier[event.sid].sid
  
      else:
          # Unpack config dictionary with default values.
          self.count = kwargs.get("count", 500)
          self.start = kwargs.get(
              "start", datetime(2008, 6, 6, 15, tzinfo=pytz.utc)
          )
          self.end = kwargs.get(
              "end", datetime(2008, 6, 6, 15, tzinfo=pytz.utc)
          )
          self.delta = kwargs.get("delta", timedelta(minutes=1))
          self.concurrent = kwargs.get("concurrent", False)
  
          self.identifiers = kwargs.get("sids", [1, 2])
          assets_by_identifier = {}
          for identifier in self.identifiers:
              assets_by_identifier[
                  identifier
              ] = env.asset_finder.lookup_generic(
                  identifier, datetime.now()
              )[
                  0
              ]
          self.sids = [
              asset.sid for asset in list(assets_by_identifier.values())
          ]
  
      # Hash_value for downstream sorting.
      self.arg_string = hash_args(*args, **kwargs)
  
      self.generator = self.create_fresh_generator()
  
file_path: catalyst/catalyst/sources/test_source.py
imports: import pytz
  from six.moves import filter
  from datetime import datetime, timedelta
  import itertools
  from six.moves import range
  from catalyst.protocol import Event, DATASOURCE_TYPE
  from catalyst.gens.utils import hash_args
label_desc: Use image node_id 1 to create a new SpecificEquityTrades object from inherited base classes: object with example: obj = SpecificEquityTrades(env, trading_calendar)