[docs]defis_isomorphic_graph_list(list1:list[nx.Graph],list2:list[nx.Graph])->bool:""" Return whether two lists of graphs are the same up to permutations and graph isomorphism. """iflen(list1)!=len(list2):returnFalseforgraph1inlist1:count_copies=0forgraphtinlist1:ifnx.is_isomorphic(graph1,grapht):count_copies+=1count_found=0forgraph2inlist2:ifnx.is_isomorphic(graph1,graph2):count_found+=1ifcount_found==count_copies:breakelse:returnFalsereturnTrue