(b) If an animal is lawfully seized or impounded pursuant to the General Laws relating to cruelty to animals or animal fighting resulting in the issuance of a criminal complaint or a criminal indictment, the authority or prosecuting agency, including the district attorney or attorney general, may file a petition with the court that is exercising jurisdiction over the criminal complaint or criminal