Modifier retrieving vertex groups?

Is it possible for an object A’s modifier to copy the vgroups of a target object (B), and have those vgroups available for subsequent modifiers in the local object (A)'s stack? (I’m working on a MOD_duplicate, which ideally will allow the retrieval of a target object’s base or modified mesh, restriction of the set of copied vertices to specific vertex groups, and the above capability – copying the vgroups from that object so they can continue to be used by the “new” object in some way).

That is what is doing Data Transfer modifier.
https://docs.blender.org/manual/en/latest/modeling/modifiers/modify/data_transfer.html