code: def update(self, currentValue):
      if self.__lastValue:
          retSubperiod = (
              currentValue - self.__lastValue - self.__flows
          ) / float(self.__lastValue)
      else:
          retSubperiod = 0.0
  
      self.__cumRet = (1 + self.__cumRet) * (1 + retSubperiod) - 1
      self.__lastPeriodRet = retSubperiod
      self.__lastValue = currentValue
      self.__flows = 0.0
  
imports: import math
  from pyalgotrade import stratanalyzer
  from pyalgotrade import observer
  from pyalgotrade import dataseries
label_desc: Use image node_id 5 for calling the TimeWeightedReturns obj's underlying member method code with example usage: obj.update(currentValue) without return types