<｜begin▁of▁sentence｜>### Instruction:
As an Energy Engineer, imagine you've been tasked with optimizing the energy distribution system in a large office building with 500 rooms. You need to evaluate the efficiency and consumption patterns to promote sustainability. One approach involves using a sampler tool, similar to the RandomNodeSampler in networkx, to extract a subset of 200 rooms for detailed analysis. This will allow you to focus on a manageable sample while still capturing the overall network dynamics.
### Response:
import networkx as nx
from littleballoffur import RandomNodeSampler

G = nx.gnp_random_graph(n=500, p=0.2)

sampler = RandomNodeSampler(200)

sampler_G = sampler.sample(G)

print(len(sampler_G))
<|EOT|>
