@staticmethod
def factory(task_name: str) ->'AnalyticTask':
    """Initialize the correct task based on the given arguments.
        :param task_name: The name of the task to initialize.
        :return: An initialized child of this class.
        """
    from . import TASK_REGISTRY
    for task in TASK_REGISTRY:
        if task.name == task_name:
            return task()
