docstr: Test ``futures.as_completed`` timing out before
  completing it's final future.
docstr_tok: ["Test","``","futures.as_completed","``","timing","out","before","completing","it","'s","final","future","."]
code: def test_future_times_out(self):
      """Test ``futures.as_completed`` timing out before
      completing it's final future."""
      already_completed = {
          CANCELLED_AND_NOTIFIED_FUTURE,
          EXCEPTION_FUTURE,
          SUCCESSFUL_FUTURE,
      }
  
      # Windows clock resolution is around 15.6 ms
      short_timeout = 0.100
      for timeout in (0, short_timeout):
          with self.subTest(timeout):
              completed_futures = set()
              future = self.executor.submit(
                  time.sleep, short_timeout * 10
              )
  
              try:
                  for f in futures.as_completed(
                      already_completed | {future}, timeout
                  ):
                      completed_futures.add(f)
              except futures.TimeoutError:
                  pass
  
              # Check that ``future`` wasn't completed.
              self.assertEqual(completed_futures, already_completed)
  
file_path: cpython/Lib/test/test_concurrent_futures/test_as_completed.py
imports: import itertools
  import time
  import unittest
  import weakref
  from concurrent import futures
  from concurrent.futures._base import CANCELLED_AND_NOTIFIED, FINISHED, Future
  from test import support
  from .util import PENDING_FUTURE, RUNNING_FUTURE, CANCELLED_AND_NOTIFIED_FUTURE, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE, create_future, create_executor_tests, setup_module
label_desc: Use image node_id 2 for calling the AsCompletedTests obj's underlying member method code with example usage: obj.test_future_times_out() without return types