code: def _poll(self, timeout: Optional[int] = None) -> None:
      if self._object_ready.is_set():
          return
      done = False
      start_time = time.time()
      sleep_time = 0.5
      while not done:
          result = self._fn(xid=self._xid)
          if result:
              self._set_object(result)
              done = True
              continue
          now_time = time.time()
          if timeout and start_time - now_time > timeout:
              done = True
              continue
          time.sleep(sleep_time)
          sleep_time = min(sleep_time * 2, 5)
  
file_path: wandb/wandb/sdk/interface/message_future_poll.py
imports: import time
  from typing import Any, Optional
  from wandb.proto import wandb_internal_pb2
  from .message_future import MessageFuture
label_desc: Use image node_id 3 for calling the MessageFuturePoll obj's underlying member method code with example usage: obj._poll(timeout) without return types