<｜begin▁of▁sentence｜>### Instruction:
As a content creator, imagine you are collaborating with a team of artists working on a digital art project. Each artist has selected a unique color palette to use for their respective artwork. Using a tool like NetworkX, how would you retrieve and display the color palettes chosen by each artist for their individual pieces within the collaborative project?
### Response:
import networkx as nx

# Create a graph
g = nx.Graph()

# Add nodes with the palette attribute
palette = ['red', 'green', 'blue', 'yellow']
for i, color in enumerate(palette):
    g.add_node(i, palette=color)

# Get the palette attribute of the nodes
node_palettes = nx.get_node_attributes(g, 'palette')
print(node_palettes)
<|EOT|>
