class_docstr: Class for sampling graph.
docstr: The number of edges in the graph.
  - If the graph is homogenous, returns an integer.
  - If the graph is heterogenous, returns a dictionary.
  
  Returns
  -------
  Union[int, Dict[str, int]]
      The number of edges. Integer indicates the total edges number of a
      homogenous graph; dict indicates edges number per edge types of a
      heterogenous graph.
docstr_tok: ["The","number","of","edges","in","the","graph",".","-","If","the","graph","is","homogenous",",","returns","an","integer",".","-","If","the","graph","is","heterogenous",",","returns","a","dictionary",".","Returns","--","--","--","-","Union","[","int",",","Dict","[","str",",","int","]","]","The","number","of","edges",".","Integer","indicates","the","total","edges","number","of","a","homogenous","graph",";","dict","indicates","edges","number","per","edge","types","of","a","heterogenous","graph","."]
code: def num_edges(self) -> Union[int, Dict[str, int]]:
      """The number of edges in the graph.
      - If the graph is homogenous, returns an integer.
      - If the graph is heterogenous, returns a dictionary.
  
      Returns
      -------
      Union[int, Dict[str, int]]
          The number of edges. Integer indicates the total edges number of a
          homogenous graph; dict indicates edges number per edge types of a
          heterogenous graph.
      """
      raise NotImplementedError
  
file_path: dgl/python/dgl/graphbolt/sampling_graph.py
imports: from typing import Dict, Union
  import torch
label_desc: Use image node_id 4 for calling the SamplingGraph obj's underlying member method code with example usage: obj.num_edges() without return types