class_docstr: A volume share slippage model as defined in Zipline's VolumeShareSlippage model.
  The slippage is calculated by multiplying the price impact constant by the square of the ratio of the order
  to the total volume.
  
  Check https://www.quantopian.com/help#ide-slippage for more details.
  
  :param priceImpact: Defines how large of an impact your order will have on the backtester's price calculation.
  :type priceImpact: float.
code: def calculatePrice(self, order, price, quantity, bar, volumeUsed):
      assert (
          bar.getVolume()
      ), "Can't use 0 volume bars with VolumeShareSlippage"
  
      totalVolume = volumeUsed + quantity
      volumeShare = totalVolume / float(bar.getVolume())
      impactPct = volumeShare**2 * self.__priceImpact
      if order.isBuy():
          ret = price * (1 + impactPct)
      else:
          ret = price * (1 - impactPct)
      return ret
  
file_path: pyalgotrade/pyalgotrade/broker/slippage.py
imports: import abc
  import six
label_desc: Use image node_id 2 for calling the VolumeShareSlippage obj's underlying member method code with example usage: obj.calculatePrice(order, price, quantity, bar, volumeUsed) and returns: ret