def _is_connected(parent, child, dag):
    """
    Whether two node are connected.

    Args:
        parent (BaseNode): Parent node.
        child (BaseNode): Child node.
        dag (DagGraph): Graph instance.

    Returns:
        bool, True or False.
    """
    return parent.name in dag.precursor_table.get(child.name)