The docs for networkx.set_node_attributes are at
https://networkx.org/documentation/stable/index.htmlIt says that the "value" needs to be a dict-like structure keyed by node to the value of the attribute.
Call the function once for each attribute and provide a dict like `{node: color(node) for node in G}`.
Or, if it is more convenient, don't use set_node_attributes. Instead, loop over the nodes and add all five
attributes for each node:
for node in G:
G.nodes[node]["color"] = color_func(node)
G.nodes[node]["size"] = size_func(node)
...
There are other good ways to input node attributes that might work better depending on how those attributes are stored ahead of time. For example, if they are in a pandas data frame you can use df.to_dict().