def test_with_invalid_field(self):
    with self.assertRaises(ValueError):
        np_box_list_ops.sort_by_field(self.boxlist, 'objectness')
    with self.assertRaises(ValueError):
        np_box_list_ops.sort_by_field(self.boxlist, 'labels')
def test_with_invalid_field(self):
    with self.assertRaises(ValueError):
        np_box_list_ops.sort_by_field(self.boxlist, 'objectness')
    with self.assertRaises(ValueError):
        np_box_list_ops.sort_by_field(self.boxlist, 'labels')