code: def sync_last_sale_prices(
      self, dt, handle_non_market_minutes, data_portal
  ):
      if not handle_non_market_minutes:
          for asset, position in iteritems(self.positions):
              last_sale_price = data_portal.get_spot_value(
                  asset, "price", dt, self.data_frequency
              )
  
              if not np.isnan(last_sale_price):
                  position.last_sale_price = last_sale_price
      else:
          for asset, position in iteritems(self.positions):
              last_sale_price = data_portal.get_adjusted_value(
                  asset,
                  "price",
                  data_portal.trading_calendar.previous_minute(dt),
                  dt,
                  self.data_frequency,
              )
  
              if not np.isnan(last_sale_price):
                  position.last_sale_price = last_sale_price
  
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 11 for calling the PositionTracker obj's underlying member method code with example usage: obj.sync_last_sale_prices(dt, handle_non_market_minutes, data_portal) without return types