How to initialize document in ProseMirror with Y.js

Continuing the discussion from Prosemirror serializer:

I saw some discussion about this cases…
I wonder how I can just update Yjs Doc by applying a new PM doc JSON ??