If a graph cannot be topologically sorted because of circular dependencies then return the remaining nodes in the graph
If a graph cannot be topologically sorted because of circular
dependencies then return the remaining nodes in the graph

Any nodes left in the graph in case of a circular dependency are the
ones causing the circular dependencies.

ranjithamca/gru