class_docstr: The data view class when G.edata[etype] is called.
class_docstr_tok: ["The","data","view","class","when","G.edata","[","etype","]","is","called","."]
code: def _transpose(self, as_dict=False):
      if isinstance(self._etype, list):
          ret = defaultdict(dict)
          for i, etype in enumerate(self._etype):
              data = self._graph._get_e_repr(self._etid[i], self._edges)
              for key in self._graph._edge_frames[self._etid[i]]:
                  ret[key][etype] = data[key]
      else:
          ret = self._graph._get_e_repr(self._etid, self._edges)
          if as_dict:
              ret = {
                  key: ret[key]
                  for key in self._graph._edge_frames[self._etid]
              }
      return ret
  
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 5 for calling the HeteroEdgeDataView obj's underlying member method code with example usage: obj._transpose(as_dict) and returns: ret