<｜begin▁of▁sentence｜>### Instruction:
Given a network with nodes 1, 2, 3, and 4 connected as follows: node 1 is connected to nodes 2 and 3, node 2 is connected to node 4, and node 3 is also connected to node 4. If the percolation states for the nodes are {1: 0.5, 2: 1.0, 3: 1.0, 4: 0.0}, compute the percolation centrality for each node using NetworkX.
### Response:
import networkx as nx

# Create a graph
G = nx.Graph()
G.add_edges_from([(1, 2), (1, 3), (2, 4), (3, 4)])

# Define percolation states
states = {1: 0.5, 2: 1.0, 3: 1.0, 4: 0.0}

# Compute the percolation centrality
centrality = nx.percolation_centrality(G, states=states)

print('Percolation centrality:', centrality)
<|EOT|>
