code: def load_edges(file_, src2index, dst2index, symmetry=False):
      """Load edges from file."""
      edges = []
      with open(file_, "r") as reader:
          for line in reader:
              items = line.strip().split()
              src, dst = src2index[items[0]], dst2index[items[1]]
              edges.append((src, dst))
              if symmetry:
                  edges.append((dst, src))
          edges = list(set(edges))
      return edges
  
file_path: PGL/examples/metapath2vec/data_preprocess.py
imports: import os
  import sys
  import tqdm
  import time
  import logging
  import random
  import argparse
  import numpy
  import pickle
  from pgl.utils.logger import log
  from utils.config import prepare_config, make_dir
label_desc: Use image node_id 2 for calling a global function with example usage: load_edges(file_, src2index, dst2index, symmetry) and returns: edges