If the court awards sole or joint custody or primary residence to a parent who has a history of committing acts of domestic violence, that parent shall be ordered to complete a program of evaluation and counseling designed specifically for perpetrators of family violence and conducted by a public or private agency or a certified mental health professional. That parent may also be ordered to attend alcohol or drug abuse treatment and any other counseling that may be appropriate.