code: def record_order(self, order):
      if self.keep_orders:
          try:
              dt_orders = self.orders_by_modified[order.dt]
              if order.id in dt_orders:
                  del dt_orders[order.id]
          except KeyError:
              self.orders_by_modified[
                  order.dt
              ] = dt_orders = OrderedDict()
          dt_orders[order.id] = order
          # to preserve the order of the orders by modified date
          # we delete and add back. (ordered dictionary is sorted by
          # first insertion date).
          if order.id in self.orders_by_id:
              del self.orders_by_id[order.id]
          self.orders_by_id[order.id] = order
  
imports: from __future__ import division
  import logbook
  import numpy
  from collections import namedtuple
  from catalyst.assets import Future
  from six import itervalues, iteritems
  import catalyst.protocol
  from catalyst.constants import LOG_LEVEL
label_desc: Use image node_id 16 for calling the PerformancePeriod obj's underlying member method code with example usage: obj.record_order(order) without return types