class_docstr: Represent a single graph with additional attributes.
class_docstr_tok: ["Represent","a","single","graph","with","additional","attributes","."]
docstr: Convert the given endpoints to edge indices.
  
  Parameters
  ----------
  src : int or list
      The index of source node(s).
  tgt : int or list
      The index of target node(s).
  
  Returns
  -------
  list
      The index of corresponding edges.
  
  Raises
  ------
  TypeError
      If the parameters are of wrong types.
  EdgeNotFoundException
      If the edge is not in the graph.
code: def edge_ids(
      self, src: Union[int, List[int]], tgt: Union[int or List[int]]
  ) -> List[Any]:
      """
      Convert the given endpoints to edge indices.
  
      Parameters
      ----------
      src : int or list
          The index of source node(s).
      tgt : int or list
          The index of target node(s).
  
      Returns
      -------
      list
          The index of corresponding edges.
  
      Raises
      ------
      TypeError
          If the parameters are of wrong types.
      EdgeNotFoundException
          If the edge is not in the graph.
      """
      if not (isinstance(src, int) or isinstance(src, list)):
          raise TypeError("'src' should be either int or list of int.")
      if not (isinstance(tgt, int) or isinstance(tgt, list)):
          raise TypeError("'tgt' should be either int or list of int.")
  
      src, tgt = check_and_expand(int_to_list(src), int_to_list(tgt))
      eid_list = []
      try:
          for src_idx, tgt_idx in zip(src, tgt):
              if not (
                  isinstance(src_idx, int) or isinstance(tgt_idx, int)
              ):
                  raise TypeError(
                      "'src' and 'tgt' should be (int, int), ('{}', '{}') received.".format(
                          type(src_idx), type(tgt_idx)
                      )
                  )
              eid_list.append(
                  self._nids_eid_mapping[(src_idx, tgt_idx)]
              )
      except KeyError:
          raise EdgeNotFoundException(
              "Edge {} does not exist!".format((src, tgt))
          )
      return eid_list
  
imports: import os
  import warnings
  from collections import namedtuple
  from typing import Any, Callable, Dict, List, Tuple, Union
  import dgl
  import scipy.sparse
  import torch
  from torch.nn.utils.rnn import pad_sequence
  from .utils import EdgeNotFoundException, SizeMismatchException, check_and_expand, entail_zero_padding, int_to_list, slice_to_list
  from .views import BatchEdgeFeatView, BatchNodeFeatView, EdgeView, NodeFeatView, NodeView
label_desc: Use image node_id 16 for calling the GraphData obj's underlying member method code with example usage: obj.edge_ids(src, tgt) and returns: eid_list