class_docstr: Like ioloop.PeriodicCallback except the 'func' can be async and return
  a Future.
  
  Will wait for func to finish each time before we call it again. (Plain
  ioloop.PeriodicCallback can "pile up" invocations if they are taking too
  long.)
class_docstr_tok: ["Like","ioloop.PeriodicCallback","except","the","'func","'","can","be","async","and","return","a","Future",".","Will","wait","for","func","to","finish","each","time","before","we","call","it","again",".","(","Plain","ioloop.PeriodicCallback","can","``","pile","up","''","invocations","if","they","are","taking","too","long",".",")"]
code: def sleep(self) -> gen.Future[None]:
      f: gen.Future[None] = gen.Future()
      self._loop.call_later(
          self._period / 1000.0, lambda: f.set_result(None)
      )
      return f
  
imports: from __future__ import annotations
  import logging
  import sys
  import threading
  from collections import defaultdict
  from traceback import format_exception
  from typing import TYPE_CHECKING, Any, Awaitable, Callable, Union
  import tornado
  from tornado import gen
  from ..core.types import ID
label_desc: Use image node_id 2 for calling the _AsyncPeriodic obj's underlying member method code with example usage: obj.sleep() and returns: f