(a) Duties of assigned or retained counsel. (1) It shall be the duty of counsel assigned to or retained for the defense of a defendant in a criminal action or proceeding to represent defendant in the trial court until the action or proceeding has been terminated in that court, and to comply with the provisions of paragraph (b)(1) or (d)(2) of this section, after which the duties of assigned counsel shall be ended. (2) It shall be the duty of counsel assigned to prosecute or defend an appeal on behalf