code: @CheckReturnValue
    private @Nullable
    LocalSyncWriteModelContainer deleteOneFromResolution(
        final NamespaceSynchronizationConfig nsConfig,
        final BsonValue documentId,
        final BsonDocument atVersion
    ) {
      final MongoNamespace namespace = nsConfig.getNamespace();
      final ChangeEvent<BsonDocument> event;
      final Lock lock =
          this.syncConfig.getNamespaceConfig(namespace).getLock().writeLock();
      lock.lock();
      final CoreDocumentSynchronizationConfig config;
      try {
        config = syncConfig.getSynchronizedDocument(namespace, documentId);
        if (config == null) {
          return null;
        }
  
        event = ChangeEvents.changeEventForLocalDelete(namespace, documentId, true);
        config.setSomePendingWrites(logicalT, atVersion, 0L, event);
      } finally {
        lock.unlock();
      }
  
      final LocalSyncWriteModelContainer container = newWriteModelContainer(nsConfig);
  
      container.addDocIDs(documentId);
      container.addLocalWrite(new DeleteOneModel<>(getDocumentIdFilter(documentId)));
      container.addLocalChangeEvent(event);
      container.addConfigWrite(
          new ReplaceOneModel<>(CoreDocumentSynchronizationConfig.getDocFilter(
            namespace, config.getDocumentId()
          ), config));
  
      return container;
    }
docs: Deletes a single synchronized document by its given id. No deletion will occur if the _id is
  not being synchronized.
  
  @param nsConfig   the namespace synchronization config of the namespace where the document
  lives.
  @param documentId the _id of the document.