code: def wait_for_results(cls, timeout=None, max_num_uploads=None):
      remaining = timeout
      count = 0
      pid = os.getpid()
      for r in cls._async_results.get(pid, []):
          if r.ready():
              continue
          t = time.time()
          # bugfix for python2.7 threading issues
          if six.PY2 and not remaining:
              while not r.ready():
                  r.wait(timeout=2.0)
          else:
              r.wait(timeout=remaining)
          count += 1
          if (
              max_num_uploads is not None
              and max_num_uploads - count <= 0
          ):
              break
          if timeout is not None:
              remaining = max(
                  0.0, remaining - max(0.0, time.time() - t)
              )
              if not remaining:
                  break
  
file_path: clearml/clearml/utilities/async_manager.py
imports: import os
  import time
  import six
  from .process.mp import SingletonLock
label_desc: Use image node_id 2 for calling the AsyncManagerMixin obj's underlying member method code with example usage: obj.wait_for_results(cls, timeout, max_num_uploads) without return types