code: def add_edata_from_dgl_HeteroGraph(gs, g):
      for feat_name, feat in g.edata.items():
          if isinstance(feat, torch.Tensor):
              assert len(g.etypes) == 1
              etype = g.etypes[0]
              gs.edata_storage.add_data(
                  feat_name=feat_name, type_name=etype, feat_obj=feat
              )
          else:
              for etype, feat_t in feat.items():
                  gs.edata_storage.add_data(
                      feat_name=feat_name,
                      type_name=etype,
                      feat_obj=feat_t,
                  )
  
file_path: cugraph/python/cugraph-dgl/cugraph_dgl/utils/cugraph_conversion_utils.py
imports: from __future__ import annotations
  from typing import Dict, Tuple, Union
  import cudf
  import pandas
  import dask.dataframe
  import dask_cudf
  from dask.distributed import get_client
  import cupy
  from cugraph.utilities.utils import import_optional
  from cugraph.gnn.dgl_extensions.dgl_uniform_sampler import src_n, dst_n
label_desc: Use image node_id 7 for calling a global function with example usage: add_edata_from_dgl_HeteroGraph(gs, g) without return types