Any attorney who provides legal representation under the provisions of this article under appointment by a circuit court, family court or by the Supreme Court of Appeals, and whose only compensation therefor is paid under the provisions of this article, shall be immune from liability arising from that representation in the same manner and to the same extent that prosecuting attorneys are immune from liability.