If a bill or petition is filed against an inmate in any court having jurisdiction, or any interrogatories propounded to the inmate as a party to the suit, that require to be answered, the inmate may be allowed the aid of counsel to prepare an answer.