def get_dependency_graph(task):
    """Compute dependency graph of a given task.

    Args:
        task (luigi.Task): the task from which the dependency graph is computed.

    Returns:
        list(luigi.Task): A list of (parent, child) tuples.
    """
    children = []
    for t in task.deps():
        children.append((task, t))
        children.extend(get_dependency_graph(t))
    return children