code: def _getNewTrades(self):
      userTrades = self.__httpClient.getUserTransactions(
          httpclient.HTTPClient.UserTransactionType.MARKET_TRADE
      )
  
      # Get the new trades only.
      ret = [t for t in userTrades if t.getId() > self.__lastTradeId]
  
      # Sort by id, so older trades first.
      return sorted(ret, key=lambda t: t.getId())
  
imports: import threading
  import time
  from six.moves import queue
  from pyalgotrade import broker
  from pyalgotrade.bitstamp import httpclient
  from pyalgotrade.bitstamp import common
label_desc: Use image node_id 2 for calling the TradeMonitor obj's underlying member method code with example usage: obj._getNewTrades() and returns: sorted