code: def load_edge_csv(
      path,
      src_index_col,
      src_mapping,
      dst_index_col,
      dst_mapping,
      encoders=None,
      **kwargs,
  ):
      df = pd.read_csv(path, **kwargs)
  
      src = [src_mapping[index] for index in df[src_index_col]]
      dst = [dst_mapping[index] for index in df[dst_index_col]]
      edge_index = torch.tensor([src, dst])
  
      edge_attr = None
      if encoders is not None:
          edge_attrs = [
              encoder(df[col]) for col, encoder in encoders.items()
          ]
          edge_attr = torch.cat(edge_attrs, dim=-1)
  
      return edge_index, edge_attr
  
file_path: pytorch_geometric/examples/hetero/load_csv.py
imports: import os.path
  import pandas
  import torch
  from sentence_transformers import SentenceTransformer
  from torch_geometric.data import HeteroData, download_url, extract_zip
  from torch_geometric.transforms import RandomLinkSplit, ToUndirected
label_desc: Use image node_id 2 for calling a global function with example usage: load_edge_csv(path, src_index_col, src_mapping, dst_index_col, dst_mapping, encoders) and returns: edge_index,  edge_attr