code: def create_trade(
      sid, price, amount, datetime, source_id="test_factory"
  ):
      trade = Event()
  
      trade.source_id = source_id
      trade.type = DATASOURCE_TYPE.TRADE
      trade.sid = sid
      trade.dt = datetime
      trade.price = price
      trade.close_price = price
      trade.open_price = price
      trade.low = price * 0.95
      trade.high = price * 1.05
      trade.volume = amount
  
      return trade
  
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 for calling a global function with example usage: create_trade(sid, price, amount, datetime, source_id) and returns: trade