def test_gather_with_invalid_field_specified(self):
    indices = np.array([2, 0, 1], dtype=int)
    boxlist = self.boxlist
    with self.assertRaises(ValueError):
        np_box_list_ops.gather(boxlist, indices, 'labels')
    with self.assertRaises(ValueError):
        np_box_list_ops.gather(boxlist, indices, ['objectness'])
def test_gather_with_invalid_field_specified(self):
    indices = np.array([2, 0, 1], dtype=int)
    boxlist = self.boxlist
    with self.assertRaises(ValueError):
        np_box_list_ops.gather(boxlist, indices, 'labels')
    with self.assertRaises(ValueError):
        np_box_list_ops.gather(boxlist, indices, ['objectness'])