code: def all_leaves(self, graph=None):
          
          if graph is None:
              graph = self.graph
          return [key for key in graph if not graph[key]]
docs: Return a list of all leaves (nodes with no downstreams)