<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dependency_graph(self):
 r""" Returns a NetworkX graph object of the dependencies See Also -------- dependency_list dependency_map Notes ----- To visualize the dependencies, the following NetworkX function and settings is helpful: nx.draw_spectral(d, arrowsize=50, font_size=32, with_labels=True, node_size=2000, width=3.0, edge_color='lightgrey', font_weight='bold') """

        dtree = nx.DiGraph()
        for propname in self.keys():
            dtree.add_node(propname)
            for dependency in self[propname].values():
                if dependency in list(self.keys()):
                    dtree.add_edge(dependency, propname)
        return dtree