def get_path_effect(graph, path, relationship_dict):
causal_effect = []<EOL>for predecessor, successor in pairwise(path):<EOL><INDENT>if pair_has_contradiction(graph, predecessor, successor):<EOL><INDENT>return Effect.ambiguous<EOL><DEDENT>edges = graph.get_edge_data(predecessor, successor)<EOL>edge_key, edge_relation, _ = rank_edges(edges)<EOL>relation = graph[predecessor][successor][edge_key][RELATION]<EOL>if relation not in relationship_dict or relationship_dict[relation] == <NUM_LIT:0>:<EOL><INDENT>return Effect.no_effect<EOL><DEDENT>causal_effect.append(relationship_dict[relation])<EOL><DEDENT>final_effect = reduce(lambda x, y: x * y, causal_effect)<EOL>return Effect.activation if final_effect == <NUM_LIT:1> else Effect.inhibition<EOL>
Calculate the final effect of the root node to the sink node in the path.

    :param pybel.BELGraph graph: A BEL graph
    :param list path: Path from root to sink node
    :param dict relationship_dict: dictionary with relationship effects
    :rtype: Effect