Credit ratings play a crucial role in the financial system, providing investors with insights into the creditworthiness of countries and…