code: def run(v, return_scores=False):
      if isinstance(v, int):
          v = [v]
      scores = []
      for _ in range(100):
          keep = graph[v, :]
          next_value = np.sum(keep, axis=0)
          to_add = next_value.argsort()
          to_add = [x for x in to_add if x not in v]
          if _ < 1:
              v.append(to_add[random.randint(0, 10)])
          else:
              v.append(to_add[0])
          if return_scores:
              scores.append(score(v) / len(keep))
      if return_scores:
          return v, scores
      else:
          return v
  
file_path: privacy/research/instahide_attack_2020/step_2_color_graph.py
imports: import multiprocessing
  import pickle
  import random
  import collections
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: run(v, return_scores) and returns: v,  scores, v