parameters: (self)
docstring: A potentially expensive operation that removes all data
          already retrieved from the buffer.
docstring_summary: A potentially expensive operation that removes all data
          already retrieved from the buffer.
docstring_tokens: A potentially expensive operation that removes all data already retrieved from the buffer .
function: def prune(self):
          """
          A potentially expensive operation that removes all data
          already retrieved from the buffer.
          """
          buf = self.buf
          if buf is None:
              self.strbuf = b''
              return
          buf.prune()
          if self.overflowed:
              # use buf.__len__ rather than len(buf) FBO of not getting
              # OverflowError on Python 2
              sz = buf.__len__()
              if sz < self.overflow:
                  # Revert to a faster buffer.
                  self._set_small_buffer()
function_tokens: def prune ( self ) : buf = self . buf if buf is None : self . strbuf = b'' return buf . prune ( ) if self . overflowed : # use buf.__len__ rather than len(buf) FBO of not getting # OverflowError on Python 2 sz = buf . __len__ ( ) if sz < self . overflow : # Revert to a faster buffer. self . _set_small_buffer ( )