code: def test_indices(self):
      self.assertEqual(slice(None).indices(10), (0, 10, 1))
      self.assertEqual(slice(None, None, 2).indices(10), (0, 10, 2))
      self.assertEqual(slice(1, None, 2).indices(10), (1, 10, 2))
      self.assertEqual(slice(None, None, -1).indices(10), (9, -1, -1))
      self.assertEqual(slice(None, None, -2).indices(10), (9, -1, -2))
      self.assertEqual(slice(3, None, -2).indices(10), (3, -1, -2))
      # issue 3004 tests
      self.assertEqual(slice(None, -9).indices(10), (0, 1, 1))
      self.assertEqual(slice(None, -10).indices(10), (0, 0, 1))
      self.assertEqual(slice(None, -11).indices(10), (0, 0, 1))
      self.assertEqual(slice(None, -10, -1).indices(10), (9, 0, -1))
      self.assertEqual(slice(None, -11, -1).indices(10), (9, -1, -1))
      self.assertEqual(slice(None, -12, -1).indices(10), (9, -1, -1))
      self.assertEqual(slice(None, 9).indices(10), (0, 9, 1))
      self.assertEqual(slice(None, 10).indices(10), (0, 10, 1))
      self.assertEqual(slice(None, 11).indices(10), (0, 10, 1))
      self.assertEqual(slice(None, 8, -1).indices(10), (9, 8, -1))
      self.assertEqual(slice(None, 9, -1).indices(10), (9, 9, -1))
      self.assertEqual(slice(None, 10, -1).indices(10), (9, 9, -1))
  
      self.assertEqual(
          slice(-100, 100).indices(10), slice(None).indices(10)
      )
      self.assertEqual(
          slice(100, -100, -1).indices(10),
          slice(None, None, -1).indices(10),
      )
      self.assertEqual(slice(-100, 100, 2).indices(10), (0, 10, 2))
  
      self.assertEqual(list(range(10))[:: sys.maxsize - 1], [0])
  
      # Check a variety of start, stop, step and length values, including
      # values exceeding sys.maxsize (see issue #14794).
      vals = [
          None,
          -(2**100),
          -(2**30),
          -53,
          -7,
          -1,
          0,
          1,
          7,
          53,
          2**30,
          2**100,
      ]
      lengths = [0, 1, 7, 53, 2**30, 2**100]
      for slice_args in itertools.product(vals, repeat=3):
          s = slice(*slice_args)
          for length in lengths:
              self.check_indices(s, length)
      self.check_indices(slice(0, 10, 1), -3)
  
      # Negative length should raise ValueError
      with self.assertRaises(ValueError):
          slice(None).indices(-1)
  
      # Zero step should raise ValueError
      with self.assertRaises(ValueError):
          slice(0, 10, 0).indices(5)
  
      # Using a start, stop or step or length that can't be interpreted as an
      # integer should give a TypeError ...
      with self.assertRaises(TypeError):
          slice(0.0, 10, 1).indices(5)
      with self.assertRaises(TypeError):
          slice(0, 10.0, 1).indices(5)
      with self.assertRaises(TypeError):
          slice(0, 10, 1.0).indices(5)
      with self.assertRaises(TypeError):
          slice(0, 10, 1).indices(5.0)
  
      # ... but it should be fine to use a custom class that provides index.
      self.assertEqual(slice(0, 10, 1).indices(5), (0, 5, 1))
      self.assertEqual(
          slice(MyIndexable(0), 10, 1).indices(5), (0, 5, 1)
      )
      self.assertEqual(
          slice(0, MyIndexable(10), 1).indices(5), (0, 5, 1)
      )
      self.assertEqual(
          slice(0, 10, MyIndexable(1)).indices(5), (0, 5, 1)
      )
      self.assertEqual(
          slice(0, 10, 1).indices(MyIndexable(5)), (0, 5, 1)
      )
  
imports: import itertools
  import operator
  import sys
  import unittest
  import weakref
  import copy
  from pickle import loads, dumps
  from test import support
label_desc: Use image node_id 7 for calling the SliceTest obj's underlying member method code with example usage: obj.test_indices() without return types