(a) When any child has been placed in any institution organized for the purpose of maintaining, supporting, and educating orphans or destitute children, with the consent of its parents, guardian, or custodian, no parent, guardian, or other person shall have the right to take the child from the institution against the consent of the institution or those in charge of the institution, except by habeas corpus proceedings, in which it shall appear that it is in the best interest of the child to take it from the institution.
(b) This section shall apply to all institutions, whether corporations or mere voluntary societies or associations.
(c) Any person taking or attempting to take any child from any institution, in violation of this section, commits a Class A misdemeanor, and shall be fined or imprisoned or both, in the discretion of the court.