docs: def _insert_pairs(self, ids_and_pairs):
          """Insert some new pairs, and keep the _key_ids updated.
          
          Params:
              ids_and_pairs -- A list of (index, (key, value)) tuples.
          
          """
          ids_to_insert = [x[0] for x in ids_and_pairs]
          
          # We use the bisect to tell us how many spots the given index is
          # shifting up in the list.
          for ids in self._key_ids.itervalues():
              for i, id in enumerate(ids):
                  ids[i] += bisect(ids_to_insert, id)
          
          # Do the actual insertion
          for i, pair in ids_and_pairs:
              self._pairs.insert(i, pair)