The county attorney for the county or the district attorney of the judicial district in which a cause of action arises shall bring any civil or criminal action requested by a county or district public health director to abate a condition that exists in violation of, or to restrain or enjoin any action that is in violation of, or to prosecute for the violation of or for the enforcement of, the public health laws and the standards, orders, and rules of the state board or a county or district board of health. If the county attorney or the district attorney fails to act, the public health director may bring an action and be represented by special counsel employed by him or her with the approval of the county or district board. An agency, through its county or district board of health or through its public health director with the approval of the state board, may employ or retain and compensate an attorney to be the legal adviser of the agency and to defend all actions and proceedings brought against the agency or the officers and employees of the agency.