docs: def add_insert(self, document):
          """Add an insert document to the list of ops.
          """
          validate_is_document_type("document", document)
          # Generate ObjectId client side.
          if not (isinstance(document, RawBSONDocument) or '_id' in document):
              document['_id'] = ObjectId()
          self.ops.append((_INSERT, document))