ancestors
Return all nodes having a path to source in G.
source
ancestors – The ancestors of source in G
set()