code: def test_cancellation_after_eager_completion(self):
      async def coro():
          return "finished without blocking"
  
      async def run():
          t = self.loop.create_task(coro())
          t.cancel()
          result = await t
          # finished task can't be cancelled
          self.assertFalse(t.cancelled())
          return result
  
      self.assertEqual(
          self.run_coro(run()), "finished without blocking"
      )
  
imports: import asyncio
  import contextvars
  import unittest
  from unittest import mock
  from asyncio import tasks
  from test.test_asyncio import utils
  from test.support.script_helper import assert_python_ok
label_desc: Use image node_id 7 for calling the EagerTaskFactoryLoopTests obj's underlying member method code with example usage: obj.test_cancellation_after_eager_completion() and returns: str, result