code: def advance(self, size: int) -> None:
          
          assert 0 < size <= self._size
          self._size -= size
          pos = self._first_pos
  
          buffers = self._buffers
          while buffers and size > 0:
              is_large, b = buffers[0]
              b_remain = len(b) - size - pos
              if b_remain <= 0:
                  buffers.popleft()
                  size -= len(b) - pos
                  pos = 0
              elif is_large:
                  pos += size
                  size = 0
              else:
                  # Amortized O(1) shrink for Python 2
                  pos += size
                  if len(b) <= 2 * pos:
                      del typing.cast(bytearray, b)[:pos]
                      pos = 0
                  size = 0
  
          assert size == 0
          self._first_pos = pos
docs: Advance the current buffer position by ``size`` bytes.