Treat Sanjay Like the British Treated Balraj Sahni ... Better for All.
In the 1940s Balraj Sahni was arrested for his communist party connections, he found himself on the wrong side of the law for promoting his party's work, Sahni used to report on the sets of K Asif's Hulchul under police escort and would go back to jail after the day's shooting.
Similarly Sanjay should be allowed to work for the movies and the fees payable for his work should be deposited by the producers directly with the court... At the end 50% 0r 75% fees should be taken for jail reforms and balance paid to Sanjay ... I am certain Sanjay will happily give away even 90% of his earning thus made.
What sense it makes, asking him to do gardening or farming or tailoring, when he can earn Crores for the Jail ... it will be beneficial to the Jail / courts and to Sanjay.
Special circumstances require extra-ordinary solutions.... besides there is a precedent in India of the court having allowed Balraj Sahni, to continue working for films and remaining in jail for the night.