code: def stats(self):
      amounts = []
      last_sale_prices = []
      for pos in itervalues(self.positions):
          amounts.append(pos.amount)
          last_sale_prices.append(pos.last_sale_price)
  
      position_values = calc_position_values(itervalues(self.positions))
      position_exposures = calc_position_exposures(
          itervalues(self.positions)
      )
  
      long_value = calc_long_value(position_values)
      short_value = calc_short_value(position_values)
      gross_value = calc_gross_value(long_value, short_value)
      long_exposure = calc_long_exposure(position_exposures)
      short_exposure = calc_short_exposure(position_exposures)
      gross_exposure = calc_gross_exposure(
          long_exposure, short_exposure
      )
      net_exposure = calc_net(position_exposures)
      longs_count = calc_longs_count(position_exposures)
      shorts_count = calc_shorts_count(position_exposures)
      net_value = calc_net(position_values)
  
      return PositionStats(
          long_value=long_value,
          gross_value=gross_value,
          short_value=short_value,
          long_exposure=long_exposure,
          short_exposure=short_exposure,
          gross_exposure=gross_exposure,
          net_exposure=net_exposure,
          longs_count=longs_count,
          shorts_count=shorts_count,
          net_value=net_value,
      )
  
imports: from __future__ import division
  import logbook
  import numpy
  from collections import namedtuple
  from math import isnan
  from six import iteritems, itervalues
  from catalyst.finance.performance.position import Position
  from catalyst.finance.transaction import Transaction
  from catalyst.utils.input_validation import expect_types
  import catalyst.protocol
  from catalyst.assets import Future, Asset
  from .position import positiondict
  from catalyst.constants import LOG_LEVEL
label_desc: Use image node_id 12 for calling the PositionTracker obj's underlying member method code with example usage: obj.stats() and returns: PositionStats