<｜begin▁of▁sentence｜>### Instruction:
Given a networkx erdos_renyi_graph with params n=900, p=0.4, can you use FrontierSampler to sample a subgraph which has 150 nodes and check the number of connected components in the sampled graph?
### Response:
import networkx as nx
from littleballoffur import FrontierSampler

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

sampler = FrontierSampler(20, 150, 70)

sampler_G = sampler.sample(G)

result = nx.number_connected_components(sampler_G)

print(result)
<|EOT|>
