class_docstr: A EdgeView class to act as G.edges for a DGLGraph.
class_docstr_tok: ["A","EdgeView","class","to","act","as","G.edges","for","a","DGLGraph","."]
code: def __getitem__(self, key):
      if isinstance(key, slice):
          # slice
          if not (
              key.start is None
              and key.stop is None
              and key.step is None
          ):
              raise DGLError(
                  'Currently only full slice ":" is supported'
              )
          edges = ALL
          etype = None
      elif key is None:
          edges = ALL
          etype = None
      elif isinstance(key, tuple):
          if len(key) == 3:
              edges = ALL
              etype = key
          else:
              edges = key
              etype = None
      elif isinstance(key, str):
          edges = ALL
          etype = key
      else:
          edges = key
          etype = None
      return EdgeSpace(
          data=HeteroEdgeDataView(self._graph, etype, edges)
      )
  
imports: from __future__ import absolute_import
  from collections import defaultdict, namedtuple
  from collections.abc import MutableMapping
  from .None import backend
  from .base import ALL, DGLError
  from .frame import LazyFeature
label_desc: Use image node_id 2 for calling the HeteroEdgeView obj's underlying member method code with example usage: obj.__getitem__(key) and returns: EdgeSpace