def METHOD_NAME(self, tag=None):
    """ Return Task status for all tasks by type.
    """
    self.log.debug("Entry.")
    subRes = {}
    with self._lock:
        for taskID, task in self._tasks.items():
            if not tag or tag in task.getTags():
                try:
                    subRes[taskID] = task.deprecated_getStatus()
                except se.UnknownTask:
                    # Return statuses for existing tasks only.
                    self.log.warn("Unknown task %s. "
                                  "Maybe task was already cleared.",
                                  taskID)
    self.log.debug("Return: %s", subRes)
    return subRes