<｜begin▁of▁sentence｜>### Instruction:
As a Hospitality Manager overseeing operations at a large resort, you have a network of 900 staff members who work together to ensure the smooth functioning of the resort at all times. You often need to analyze how different teams within the resort collaborate and communicate with each other. Using the FrontierSampler API from NetworkX, you can sample a subgraph from your network of 900 staff members, focusing on 150 individuals to observe their interconnected relationships. By doing this, you can determine the number of connected components within the sampled subgraph, enabling you to gain valuable insights into how different teams and departments within the resort work together.
### 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|>
