I happened to see the 1962 movie Pressure Point. It is a racial drama, with Sidney Poitier as the good-guy black psychiatrist and rock star Bobby Darin as an American prisoner with Nazi beliefs in the 1940s.
It is funny to see these old movies treat nonsense-babbling psychiatrists with great respect. Poitier cures Darin of his nightmares by figuring out that they are rooted in symbolism of his unhappy childhood. But Darin also manages to push Poitier's buttons, and Poitier loses his objectivity and tries to block him from being paroled from his sedition sentence. The authorities decide that Poitier must have some sort of personality conflict with him, and they parole him.
Like other Poitier movies, this has a strong anti-racism theme. Poitier is a black man in a white man's job, but he cannot get the respect of a white man. But it also seems to me that he is abusing his power as a psychiatrist. He is personally offended by Darin's political beliefs, and he uses his discretion as a psychiatrist to keep Darin in prison because of a personal disagreement with those beliefs, and not for any psychiatric disorder.
It seems to me that it is grossly unethical for a shrink to imprison someone for his beliefs or for his disrespect for authority. The movie seems to approve of it. I know, it is just a movie. I saw One Flew Over the Cuckoo's Nest also. Being a racist Nazi sympathizer during World War II is about as offensive as a political belief as can be. Still, I did not like the shrink using his power to punish someone for a political belief.