<｜begin▁of▁sentence｜>### Instruction:
Given a networkx erdos_renyi_graph with params n=200, p=0.4, can you use SnowBallSampler to sample a subgraph which has 20 nodes and check whether the sampled graph is connected or not ?
### Response:
import networkx as nx
from littleballoffur import SnowBallSampler

G = nx.gnp_random_graph(n=200, p=0.4)

sampler = SnowBallSampler(20)

sampler_G = sampler.sample(G)

result = nx.is_connected(sampler_G)

print(result)
<|EOT|>
