There are two shards which define same name module and same method signature, how to use both shards?

Yes. Modules and classes can be reopened. I think is an consequence of wanting global namespace and allowing monkey-patching.

That means that as a final user you could load shard A, alias method to re-expose it with a different name, then load shard B.

But that if shard A is used as intermediate dependency this will nos dependants of A to keep using A. They will use B.

But as an end user you can do that.