code: def truncate(self, index, chain):
          
          self._trace[chain] = self._trace[chain][:index]
docs: Truncate the trace array to some index.
  
          :Parameters:
          index : int
            The index within the chain after which all values will be removed.
          chain : int
            The chain index (>=0).