code: def gen_pair(walks, left_win_size=2, right_win_size=2):
      src = []
      pos = []
      for walk in walks:
          for left_offset in range(1, left_win_size + 1):
              src.extend(walk[left_offset:])
              pos.extend(walk[:-left_offset])
          for right_offset in range(1, right_win_size + 1):
              src.extend(walk[:-right_offset])
              pos.extend(walk[right_offset:])
      src, pos = np.array(src, dtype=np.int64), np.array(
          pos, dtype=np.int64
      )
      src, pos = np.expand_dims(src, -1), np.expand_dims(pos, -1)
      src, pos = np.expand_dims(src, -1), np.expand_dims(pos, -1)
      return src, pos
  
imports: import argparse
  import time
  import math
  import os
  import io
  from multiprocessing import Pool
  import glob
  import numpy
  import sklearn.metrics
  from sklearn.metrics import f1_score
  import pgl
  from pgl import data_loader
  from pgl.utils import op
  from pgl.utils.logger import log
  import paddle.fluid
  import paddle.fluid.layers
label_desc: Use image node_id 3 for calling a global function with example usage: gen_pair(walks, left_win_size, right_win_size) and returns: src,  pos