<｜begin▁of▁sentence｜>### Instruction:
Given a networkx erdos_renyi_graph with params n=1000, p=0.3, can you use MetropolisHastingsRandomWalkSampler to sample a subgraph which has 500 nodes and compute the sampled graph's node connectivity between all pairs of nodes?
### Response:
import networkx as nx
from littleballoffur import MetropolisHastingsRandomWalkSampler

G = nx.erdos_renyi_graph(n=1000, p=0.3)

sampler = MetropolisHastingsRandomWalkSampler(500, seed=10, alpha=0.8)

sampler_G = sampler.sample(G)

# Compute node connectivity between all pairs of nodes
result = nx.all_pairs_node_connectivity(sampler_G)
print(result)
<|EOT|>
