code: def test_long_aslongandoverflow(self):
      # Test PyLong_AsLongAndOverflow()
      aslongandoverflow = _testcapi.pylong_aslongandoverflow
      from _testcapi import LONG_MIN, LONG_MAX
  
      # round trip (object -> long -> object)
      for value in (LONG_MIN, LONG_MAX, -1, 0, 1, 1234):
          with self.subTest(value=value):
              self.assertEqual(aslongandoverflow(value), (value, 0))
  
      self.assertEqual(aslongandoverflow(IntSubclass(42)), (42, 0))
      self.assertEqual(aslongandoverflow(Index(42)), (42, 0))
      self.assertEqual(aslongandoverflow(MyIndexAndInt()), (10, 0))
  
      self.assertEqual(aslongandoverflow(LONG_MIN - 1), (-1, -1))
      self.assertEqual(aslongandoverflow(LONG_MAX + 1), (-1, 1))
  
imports: import unittest
  import sys
  from test.support import import_helper
label_desc: Use image node_id 11 for calling the LongTests obj's underlying member method code with example usage: obj.test_long_aslongandoverflow() without return types