async def take(self, timeout=None):
args = None<EOL>if timeout is not None:<EOL><INDENT>args = (timeout,)<EOL><DEDENT>res = await self.conn.call(self.__funcs['<STR_LIT>'], args)<EOL>if len(res.body) > <NUM_LIT:0>:<EOL><INDENT>return self._create_task(res.body)<EOL><DEDENT>return None<EOL>
Takes task from the queue, waiting the timeout if specified

:param timeout: Seconds to wait for ready tasks
:return: Task instance