Whenever the public defender represents any indigent person held in custody without commitment or charged with any criminal offense, he or she must (1) counsel and defend such person, and (2) prosecute any appeals and other remedies, whether before or after conviction, which he or she considers to be in the interests of justice.