(a) Except as stated in paragraph (c), a lawyer shall not represent a client or, where representation has commenced, shall withdraw from the representation of a client if:
(1) the representation will result in violation of the Rules of Professional Conduct or other law;
(2) the lawyer's physical or mental condition materially impairs the lawyer's ability to represent the client; or
(3) the lawyer is discharged.
(b) Except as stated in paragraph (c), a lawyer may withdraw from representing a client if:
(1) withdrawal can be accomplished without material adverse effect on the interests of the client;
(2) the client persists in a course of action involving the lawyer's services that the lawyer reasonably believes is criminal or fraudulent;
(3) the client has used the lawyer's services to perpetrate a crime or fraud;
(4) the client insists upon taking action that the lawyer considers repugnant or with which the lawyer has a fundamental disagreement;
(5) the client fails substantially to fulfill an obligation to the lawyer regarding the lawyer's services and has been given reasonable warning that the lawyer will withdraw unless the obligation is fulfilled;
(6) the representation will result in an unreasonable financial burden on the lawyer or has been rendered unreasonably difficult by the client; or
(7) other good cause for withdrawal exists.
(c) A lawyer must comply with applicable law requiring notice to or permission of a tribunal when terminating a representation. When ordered to do so by a tribunal, a lawyer shall continue representation notwithstanding good cause for terminating the representation.
(d) Upon termination of representation, a lawyer shall take steps to the extent reasonably practicable to protect a client's interests, such as giving reasonable notice to the client, allowing time for employment of other counsel, surrendering papers and property to which the client is entitled and refunding any advance payment of fee or expense that has not been earned or incurred. The lawyer may retain papers relating to the client to the extent permitted by other law.