When the public defender or an assigned counsel represents a person who is a minor in a criminal proceeding, at the expense of a county, the court may order the parent or guardian of such minor to reimburse the county for all or any part of such expense, if it determines that the parent or guardian has the ability to pay such expense.