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

G = nx.gnp_random_graph(n=400, p=0.25)

sampler = SpikyBallSampler(number_of_nodes=50, sampling_probability=0.2, initial_nodes_ratio=0.1, seed=42, max_hops=100000, mode='fireball', max_visited_nodes_backlog=100, restart_hop_size=10, distrib_coeff=1.0)

sampler_G = sampler.sample(G)

result = nx.is_connected(sampler_G)

print(result)
<|EOT|>
