code: def test_index_returns_int_subclass(self):
      class BadInt:
          def __index__(self):
              return True
  
      class BadInt2(int):
          def __index__(self):
              return True
  
      bad_int = BadInt()
      with self.assertWarns(DeprecationWarning):
          n = operator.index(bad_int)
      self.assertEqual(n, 1)
  
      bad_int = BadInt2()
      n = operator.index(bad_int)
      self.assertEqual(n, 0)
  
imports: import unittest
  from test import support
  import operator
label_desc: Use image node_id 8 for calling the BaseTestCase obj's underlying member method code with example usage: obj.test_index_returns_int_subclass() and returns: True, True