@classmethod
def from_data(cls, task_list):
    """Create an instance from a bunch of tasks.

        Parameters
        ----------
        task_list: list
            A sequence of tasks, each item is in format (task_name, depends).

        Returns
        -------
        instance: DependencyManager
            Instance constructed from input argument.

        """
    instance = cls()
    for task_name, depends in task_list:
        instance.add(task_name, depends)
    return instance
