What role does the Attorney General play in protecting the independence of the judiciary during times of public controversy?

With lawyers and activists seeking the AG’s permission for contempt proceedings after incidents involving the Chief Justice, I want to understand how the AG’s actions can influence public trust in the judiciary.