code: def test_asyncio_run_reports_hanging_tasks_errors(self):
      lo_task = None
      call_exc_handler_mock = mock.Mock()
  
      async def leftover():
          try:
              await asyncio.sleep(0.1)
          except asyncio.CancelledError:
              1 / 0
  
      async def main():
          loop = asyncio.get_running_loop()
          loop.call_exception_handler = call_exc_handler_mock
  
          nonlocal lo_task
          lo_task = asyncio.create_task(leftover())
          return 123
  
      self.assertEqual(asyncio.run(main()), 123)
      self.assertTrue(lo_task.done())
  
      call_exc_handler_mock.assert_called_with(
          {
              "message": test_utils.MockPattern(
                  r"asyncio.run.*shutdown"
              ),
              "task": lo_task,
              "exception": test_utils.MockInstanceOf(ZeroDivisionError),
          }
      )
  
imports: import _thread
  import asyncio
  import contextvars
  import re
  import signal
  import sys
  import threading
  import unittest
  from test.test_asyncio import utils
  from unittest import mock
  from unittest.mock import patch
label_desc: Use image node_id 7 for calling the RunTests obj's underlying member method code with example usage: obj.test_asyncio_run_reports_hanging_tasks_errors() and returns: int