<｜begin▁of▁sentence｜>### Instruction:
Given a networkx erdos_renyi_graph with params n=500, p=0.2, can you use RandomWalkWithRestartSampler to sample a subgraph which has 150 nodes with a restart probability of 0.3, starting from node 5?
### Response:
import networkx as nx
from littleballoffur import RandomWalkWithRestartSampler

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

sampler = RandomWalkWithRestartSampler(150, seed=10, p=0.3)

sampler_G = sampler.sample(G, start_node=5)

print(sampler_G.nodes())
<|EOT|>
