code: def handle_data_api(context, data):
      if context.incr == 0:
          assert 0 not in context.portfolio.positions
      else:
          assert (
              context.portfolio.positions[0].amount == context.incr
          ), "Orders not filled immediately."
          assert (
              context.portfolio.positions[0].last_sale_date
              == context.get_datetime()
          ), "Orders not filled at current datetime."
      context.incr += 1
      order(sid(0), 1)
  
      record(incr=context.incr)
  
imports: import numpy
  from nose.tools import assert_raises
  from six import itervalues
  from zipline.algorithm import TradingAlgorithm
  from zipline.api import FixedSlippage, order, set_slippage, record, sid
  from zipline.errors import UnsupportedOrderParameters
  from zipline.finance.execution import LimitOrder, MarketOrder, StopLimitOrder, StopOrder
label_desc: Use image node_id 4 for calling a global function with example usage: handle_data_api(context, data) without return types