Provide access to master symbols

How can we get details for master symbol? I have symbol instance which might or might not have overrides but I need to get all details (entire layers structure) for the symbol master of the instance.

In general it will be great to have ability to enumerate master symbols and other shared entities.

Feature request from How to get symbol master for symbol instance?