code: def gen_graph(size, graph):
      graph, neigh = sample_neigh(graph, size)
      return graph.subgraph(neigh)
  
imports: import numpy
  import networkx
  import random
  import torch
  import itertools
label_desc: Use image node_id 9 for calling a global function with example usage: gen_graph(size, graph) and returns: graph