<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_node_attributes(G, name):
 """Get node attributes from graph Parameters G : DyNetx Graph name : string Attribute name Returns ------- Dictionary of attributes keyed by node. """

    return {n: d[name] for n, d in G.node.items() if name in d}