build_dependency_graph function

Build a field dependency graph from calculated fields