def testNormalizeIndices(self):
    indices = [0, 2]
    nlzd_indices = normalize_indices(indices, 3)
    self.assertEqual(nlzd_indices, indices)
    nlzd_indices = normalize_indices(indices, 4)
    self.assertEqual(nlzd_indices, indices)
    indices = [0, (- 1)]
    nlzd_indices = normalize_indices(indices, 3)
    self.assertEqual(nlzd_indices, [0, 2])
    with self.assertRaises(ValueError):
        nlzd_indices = normalize_indices([3], 3)
    with self.assertRaises(ValueError):
        nlzd_indices = normalize_indices([(- 4)], 3)
def testNormalizeIndices(self):
    indices = [0, 2]
    nlzd_indices = normalize_indices(indices, 3)
    self.assertEqual(nlzd_indices, indices)
    nlzd_indices = normalize_indices(indices, 4)
    self.assertEqual(nlzd_indices, indices)
    indices = [0, (- 1)]
    nlzd_indices = normalize_indices(indices, 3)
    self.assertEqual(nlzd_indices, [0, 2])
    with self.assertRaises(ValueError):
        nlzd_indices = normalize_indices([3], 3)
    with self.assertRaises(ValueError):
        nlzd_indices = normalize_indices([(- 4)], 3)