in pythonflow/core.py [0:0]
def control_dependencies(dependencies, graph=None):
"""
Ensure that all `dependencies` are executed before any operations in this scope.
Parameters
----------
dependencies : list
Sequence of operations to be evaluted before evaluating any operations defined in this
scope.
"""
# Add dependencies to the graph
graph = Graph.get_active_graph(graph)
graph.dependencies.extend(dependencies)
yield
# Remove dependencies from the graph
del graph.dependencies[-len(dependencies):]