@staticmethod<EOL><INDENT>def _apply_task(task: Task, args: Tuple, kwargs: Dict[str, Any]) -> Any:<DEDENT>
if args is None:<EOL><INDENT>args = ()<EOL><DEDENT>if kwargs is None:<EOL><INDENT>kwargs = {}<EOL><DEDENT>start = monotonic()<EOL>try:<EOL><INDENT>return task.apply(*args, **kwargs)<EOL><DEDENT>finally:<EOL><INDENT>delta = monotonic() - start<EOL>logger.info("<STR_LIT>" % (task.name, delta))<EOL><DEDENT>
Logs the time spent while running the task.