else:
return F.tensor(lst)
if node_attrs is not None:
attr_dict = {attr : [] for attr in node_attrs}
for nid in range(self.number_of_nodes()):
for attr in node_attrs:
attr_dict[attr].append(nx_graph.nodes[nid][attr])
for attr in node_attrs:
After Change
for attr in node_attrs:
self._node_frame[attr] = _batcher(attr_dict[attr])
if edge_attrs is not None:
has_edge_id = "id" in next(iter(nx_graph.edges(data=True)))[-1]
attr_dict = defaultdict(lambda: [None] * self.number_of_edges())
if has_edge_id:
for u, v, attrs in nx_graph.edges(data=True):