James P. Donohue is a former U.S. magistrate judge.

“We do not have Obama judges or Trump judges, Bush judges or Clinton judges,” Supreme Court Chief Justice John G. Roberts Jr. said in a statement issued in November, countering a reference by President Trump to an “Obama judge.”

In my experience, federal judges work diligently to keep their personal views out of the judicial process. They would be appalled by the thought that simply noting the president who appointed them is all the public needs to know about what went into a decision. Yet, as much as Roberts and others on the federal bench bemoan attempts to reduce the judiciary to just another political institution, some judges have themselves contributed to the problem. 

They have done so as members of the Federalist Society, a network of conservative and libertarian lawyers and legal scholars — it claims 60,000 members — that calls itself a nonpartisan educational organization but increasingly appears to be a political operation in all but name. 

That much was made clear by a Post investigation in May that showed the intertwined interests of Federalist Society Executive Vice President Leonard Leo and a network of nonprofits dedicated to drumming up support among the public and politicians for the appointment of conservative judges.

Leo told The Post that he is careful to avoid conflicts between the educational work of the Federalist Society and the nonprofit’s advocacy, but the inescapable takeaway from The Post’s investigation is that the organization operates in such a gray area that no judge should be a member of the Federalist Society or participate in its activities.

Leonard Leo, the executive vice president of the Federalist Society, in New York in November 2016. (Carolyn Kaster/AP)

Yet in the first year of the Trump administration, as the Hill noted, “Of the 13 judicial nominees confirmed since President Trump took office, 10 are either current or former Federalist Society members or regular speakers at its events. Eight of the 10 appellate Trump nominees pending before the Senate have ties to the group.” 

The Federalist Society has also advised the president regarding potential Supreme Court nominees, according to the New York Times. (The society says it does not advocate for individual judicial nominees.) In January, a Washington Post Magazine article about the Federalist Society reported that four members of the court, in addition to Roberts, are either former members or were closely associated with the organization: Samuel A. Alito Jr., Neil M. Gorsuch, Brett M. Kavanaugh and Clarence Thomas.

For anyone concerned about the unseemly mingling of politics and the judiciary, a little-noticed formal ethics opinion issued in February by the committee responsible for the Code of Conduct for United States Judges may offer hope. 

Judges are bound by the Code of Conduct, which comprises five canons and associated formal opinions issued by the committee, which provide ethical guidance. Substantial speech and associational restrictions are imposed on active judges to preserve the judiciary’s independence and integrity. 

The restrictions are known requirements for people wishing to serve as judges and are accepted, perhaps begrudgingly, by those who serve. The rules exist because deference to the judgment and rulings of courts depends on public confidence in the integrity and independence of judges.

For many years, the Code of Conduct committee ducked the issue of judicial participation in the Federalist Society, in part, it seemed, because many powerful judges (see above) either have been or are associated with the organization.

The committee now appears to have drawn a line with its issuance of advisory opinion No. 116 expanding the scope of prohibited political activity. The Federalist Society is not mentioned by name, but the opinion is directed to the propriety of participation by judges in programs or membership in groups engaged in public-policy debates.

The prohibited political activities include those involving “hot-button issues in current political campaigns” or that are “politically-oriented” or have “political overtones.” Public perception also plays a vital role, as the opinion bars judges from participation that would “give rise to an appearance of engaging in political activity” or “would otherwise give the appearance of impropriety.”

The committee also warned judges that they should stay away from groups “where the funding sources are unknown or likely to be from sources engaged in litigation or political advocacy.” The New York Times noted of the Federalist Society’s 2015 annual report, the organization “discloses who contributes most of its money. But it also takes anonymous contributions, from players including the Mercer family, which was a major backer of Donald Trump.” The annual report listed 14 anonymous donors on the “platinum” level — those giving $100,000 or more.

In the past, the Federalist Society’s assertion of nonpartisanship has provided cover for conservative judges who wish to join an organization whose executive vice president, as The Post noted, is a “maestro” of the “modern machinery of political persuasion.” The Code of Conduct committee’s latest opinion should force a reconsideration. 

The expanded definition of prohibited political activity does not endanger the Federalist Society , nor its ability to function as a conduit of conservative ideology for lawyers and academia. It simply makes the continued participation of judges in the organization indefensible.