code: def add_edge_ids_to_edges_dict(
      edge_data_dict, edge_id_offset_d, id_dtype
  ):
      eids_data_dict = {}
      for etype, df in edge_data_dict.items():
          # Do not modify input by user
          if len(df.columns) != 2:
              raise ValueError(
                  "Provided dataframe in edge_dict contains more than 2 columns",
                  "DataFrame with only 2 columns is supported",
                  "Where first is treated as src and second as dst",
              )
          df = df.copy(deep=False)
          df = df.rename(
              columns={df.columns[0]: src_n, df.columns[1]: dst_n}
          )
          df[eid_n] = id_dtype(1)
          df[eid_n] = df[eid_n].cumsum()
          df[eid_n] = df[eid_n] + edge_id_offset_d[etype] - 1
          df[eid_n] = df[eid_n].astype(id_dtype)
          eids_data_dict[etype] = df
      return eids_data_dict
  
imports: import numpy
  from cugraph.gnn.dgl_extensions.utils.sampling import eid_n, src_n, dst_n
  from cugraph.utilities.utils import import_optional, MissingModule
label_desc: Use image node_id 3 for calling a global function with example usage: add_edge_ids_to_edges_dict(edge_data_dict, edge_id_offset_d, id_dtype) and returns: eids_data_dict