code: def set_edge_lazy_features(g, feature_names):
      """Assign lazy features to the ``edata`` of the input graph for prefetching optimization.
  
      When used in a :class:`~dgl.dataloading.Sampler`, lazy features mark which data
      should be fetched before computation in model. See :ref:`guide-minibatch-prefetching`
      for a detailed explanation.
  
      If the graph is homogeneous, this is equivalent to:
  
      .. code:: python
  
         g.edata.update({k: LazyFeature(k, g.edata[dgl.EID]) for k in feature_names})
  
      If the graph is heterogeneous, this is equivalent to:
  
      .. code:: python
  
          for type_, names in feature_names.items():
              g.edges[type_].data.update(
                  {k: LazyFeature(k, g.edges[type_].data[dgl.EID]) for k in names})
  
      Parameters
      ----------
      g : DGLGraph
          The graph.
      feature_names : list[str] or dict[etype, list[str]]
          The feature names to prefetch. The ``etype`` key is either a string
          or a triplet.
  
      See also
      --------
      dgl.LazyFeature
      """
      return _set_lazy_features(g.edges, g.edata, feature_names)
  
imports: import inspect
  from collections.abc import Mapping
  from ..None import backend
  from ..base import EID, NID
  from ..convert import heterograph
  from ..frame import LazyFeature
  from ..transforms import compact_graphs
  from ..utils import context_of, recursive_apply
label_desc: Use image node_id 3 for calling a global function with example usage: set_edge_lazy_features(g, feature_names) and returns: _set_lazy_features