code: def chooseNeighbor(v, graphs, layers_alias, layers_accept, layer):
      v_list = graphs[layer][v]
  
      idx = alias_sample(
          layers_accept[layer][v], layers_alias[layer][v]
      )
      v = v_list[idx]
  
      return v
  
imports: import itertools
  import math
  import random
  import pandas
  from joblib import Parallel, delayed
  from .alias import alias_sample, create_alias_table
  from .utils import partition_num
label_desc: Use image node_id 1 for calling a global function with example usage: chooseNeighbor(v, graphs, layers_alias, layers_accept, layer) and returns: v