code: def number_of_edges(
      self, u: NodeKey | None = None, v: NodeKey | None = None
  ) -> int:
      if u is not None or v is not None:
          raise NotImplementedError
      return self.src_indices.size
  
file_path: cugraph/python/nx-cugraph/nx_cugraph/classes/digraph.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  import cupy
  import networkx
  import nx_cugraph
  from .graph import Graph
label_desc: Use image node_id 3 for calling the DiGraph obj's underlying member method code with example usage: obj.number_of_edges(u, v) and returns: self