What was held in State of Madhya Pradesh v. Shobharam regarding the right to consult a lawyer under Article 22?

In State of Madhya Pradesh v. Shobharam, the Supreme Court held that a person arrested on accusation of a crime becomes entitled to be defended by a counsel at the trial and this right is not lost even if he is released on bail, or is tried by a court which has no power to impose a sentence of imprisonment. Thus, a provision barring a lawyer from appearing before a Nyaya Panchanyat would be void to the extent it denied a person arrested the right to be defended by a lawyer of his choice in a trial for the crime for which he has been arrested. If, however, no request for being represented by a lawyer has been made, and so no such request has been turned down, then there is no breach of Fundamental Rights contained in Article 22 (1).