code: def reducePosition(self, instrument):
      currentPos = self.getBroker().getShares(instrument)
      if currentPos > 0:
          self.marketOrder(instrument, currentPos * -1)
      elif currentPos < 0:
          self.marketOrder(instrument, currentPos * -1)
  
imports: from __future__ import print_function
  from pyalgotrade import strategy
  from pyalgotrade import dataseries
  from pyalgotrade.dataseries import aligned
  from pyalgotrade import plotter
  from pyalgotrade.barfeed import yahoofeed
  from pyalgotrade.stratanalyzer import sharpe
  import numpy
  import statsmodels.api
label_desc: Use image node_id 7 for calling the StatArb obj's underlying member method code with example usage: obj.reducePosition(instrument) without return types