The plea deal was made only days before the parents were set to go on trial in County Court here , and only two weeks after the brutal beating death of a 7-year-old girl in Brooklyn made headlines in New York City .