code: def _render_val_with_prev(self, w, n, current_val, symbol_len):
          
          sl = symbol_len-1
          if len(w) > 1:
              out = self._revstart
              if current_val != self.prior_val:
                  out += self._x + hex(current_val).rstrip('L').ljust(sl)[:sl]
              elif n == 0:
                  out += hex(current_val).rstrip('L').ljust(symbol_len)[:symbol_len]
              else:
                  out += ' '*symbol_len
              out += self._revstop
          else:
              pretty_map = {
                  (0, 0): self._low + self._low * sl,
                  (0, 1): self._up + self._high * sl,
                  (1, 0): self._down + self._low * sl,
                  (1, 1): self._high + self._high * sl,
              }
              out = pretty_map[(self.prior_val, current_val)]
          return out
docs: Return a string encoding the given value in a waveform.
  
          :param w: The WireVector we are rendering to a waveform
          :param n: An integer from 0 to segment_len-1
          :param current_val: the value to be rendered
          :param symbol_len: and integer for how big to draw the current value
  
          Returns a string of printed length symbol_len that will draw the
          representation of current_val.  The input prior_val is used to
          render transitions.