How does Magento\Setup\Module\Di\Compiler\Config\Chain\InterceptorSubstitution::resolvePreferences() work?

Context: How does Magento\Setup\Module\Di\Compiler\Config\Chain\InterceptorSubstitution::modify() work?