code: def run(self):
      while not self.__stop:
          try:
              trades = self._getNewTrades()
              if len(trades):
                  self.__lastTradeId = trades[-1].getId()
                  common.logger.info(
                      "%d new trade/s found" % (len(trades))
                  )
                  self.__queue.put((TradeMonitor.ON_USER_TRADE, trades))
          except Exception as e:
              common.logger.critical(
                  "Error retrieving user transactions", exc_info=e
              )
  
          time.sleep(TradeMonitor.POLL_FREQUENCY)
  
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 5 for calling the TradeMonitor obj's underlying member method code with example usage: obj.run() without return types