class_docstr: A decorator that:
      * wrap batch function
      * implement CORK algorithm to cork & release calling of wrapped function
  The wrapped function should be an async function.
class_docstr_tok: ["A","decorator","that",":","*","wrap","batch","function","*","implement","CORK","algorithm","to","cork","&","release","calling","of","wrapped","function","The","wrapped","function","should","be","an","async","function","."]
code: def __call__(
      self,
      callback: t.Callable[
          [t.Sequence[T_IN]], t.Coroutine[None, None, t.Sequence[T_OUT]]
      ],
  ) -> t.Callable[[T_IN], t.Coroutine[None, None, T_OUT]]:
      self.callback = callback
  
      @functools.wraps(callback)
      async def _func(data: t.Any) -> t.Any:
          if self._controller is None:
              self._controller = self._loop.create_task(
                  self.controller()
              )
          try:
              r = await self.inbound_call(data)
          except asyncio.CancelledError:
              return None if self.fallback is None else self.fallback()
          if isinstance(r, Exception):
              raise r
          return r
  
      return _func
  
imports: from __future__ import annotations
  import asyncio
  import collections
  import functools
  import logging
  import time
  import traceback
  import typing
  from functools import cached_property
  import attr
  import numpy
  from ..utils.alg import TokenBucket
label_desc: Use image node_id 5 for calling the CorkDispatcher obj's underlying member method code with example usage: obj.__call__(callback) and returns: _func, r, unknown