code: void insertMany(final MongoNamespace namespace,
                    final List<BsonDocument> documents) {
      this.waitUntilInitialized();
  
      try {
        ongoingOperationsGroup.enter();
        // Remove forbidden fields from the documents before inserting them into the local collection.
        final List<BsonDocument> docsForStorage = new ArrayList<>(documents.size());
  
        for (final BsonDocument document : documents) {
          docsForStorage.add(sanitizeDocument(document));
        }
  
        final NamespaceSynchronizationConfig nsConfig = this.syncConfig.getNamespaceConfig(namespace);
        final Lock lock = nsConfig.getLock().writeLock();
        lock.lock();
        final List<ChangeEvent<BsonDocument>> eventsToEmit = new ArrayList<>();
        try {
          getLocalCollection(namespace).insertMany(docsForStorage);
          for (final BsonDocument document : docsForStorage) {
            final BsonValue documentId = BsonUtils.getDocumentId(document);
            final ChangeEvent<BsonDocument> event =
                ChangeEvents.changeEventForLocalInsert(namespace, document, true);
            final CoreDocumentSynchronizationConfig config = syncConfig.addAndGetSynchronizedDocument(
                namespace,
                documentId
            );
            config.setSomePendingWritesAndSave(logicalT, event);
            eventsToEmit.add(event);
          }
        } finally {
          lock.unlock();
        }
        checkAndInsertNamespaceListener(namespace);
        for (final ChangeEvent<BsonDocument> event : eventsToEmit) {
          eventDispatcher.emitEvent(nsConfig, event);
        }
      } finally {
        ongoingOperationsGroup.exit();
      }
    }
docs: Inserts one or more documents.
  
  @param documents the documents to insert