def assure_queue(fnc):
 @wraps(fnc)
 def _wrapped(self, queue, *args, **kwargs):
  if (not isinstance(queue, Queue)):
   queue = self._manager.get(queue)
  return fnc(self, queue, *args, **kwargs)
 return _wrapped

def assure_queue ( fnc ) : @ wraps ( fnc ) def _wrapped ( self , queue , * args , ** kwargs ) : if ( not isinstance ( queue , Queue ) ) : queue = self . _manager . get ( queue ) return fnc ( self , queue , * args , ** kwargs ) return _wrapped
converts a queue id or name passed as the queue parameter to a queue object .