<｜begin▁of▁sentence｜>### Instruction:
Given a graph you can read from littleballoffur12.sparse6, how can you use NonBackTrackingRandomWalkSampler to sample a subgraph with 10 nodes without revisiting the immediately previous node?
### Response:
import networkx as nx
from littleballoffur import NonBackTrackingRandomWalkSampler
G = nx.read_sparse6('littleballoffur12.sparse6')
sampler = NonBackTrackingRandomWalkSampler(number_of_nodes=10)
sampler_G = sampler.sample(G)
print(sampler_G.edges())
print(sampler_G.nodes())
<|EOT|>
