<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edge set [('A', 'B'), ('B', 'A'), ('A', 'C'), ('B', 'C'), ('C', 'A')], can you compute the reciprocity of the whole graph and also specifically for node A using NetworkX?
### Response:
import networkx as nx

# Create a directed graph
G = nx.DiGraph()

# Add edges
G.add_edge('A', 'B')
G.add_edge('B', 'A') # reciprocal to A->B
G.add_edge('A', 'C')
G.add_edge('B', 'C')
G.add_edge('C', 'A') # reciprocal to A->C

# Compute reciprocity for the entire graph
reciprocity_all = nx.reciprocity(G)

# Compute reciprocity for a single node
reciprocity_node = nx.reciprocity(G, nodes='A')

print('Reciprocity of the whole graph:', reciprocity_all)
print('Reciprocity of node A:', reciprocity_node)
<|EOT|>
