Not seeing any similarity there other than being a separate group. At least the judicial branch has to follow procedure and constitutional law, whereas a military can just rule via force.
The judicial branch decides what Constitutional Law means. Its constraints on doing that are largely that it had traditions of applying certain principals developed by the judiciary itself, and, of course, that it is constrained by what people will follow when it issues its dictates.
But, yes, the similarity is quite distant, as I said; just less distant than that in the offered comparison between Turkey and Iraq.