docs: def _delete(self, bits, pos):
          """Delete bits at pos."""
          assert 0 <= pos <= self.len
          assert pos + bits <= self.len
          if not pos:
              # Cutting bits off at the start.
              self._truncatestart(bits)
              return
          if pos + bits == self.len:
              # Cutting bits off at the end.
              self._truncateend(bits)
              return
          if pos > self.len - pos - bits:
              # More bits before cut point than after it, so do bit shifting
              # on the final bits.
              end = self._slice(pos + bits, self.len)
              assert self.len - pos > 0
              self._truncateend(self.len - pos)
              self._append(end)
              return
          # More bits after the cut point than before it.
          start = self._slice(0, pos)
          self._truncatestart(pos + bits)
          self._prepend(start)
          return