code: def size(self, weight: AttrKey | None = None) -> int:
      if weight is not None:
          raise NotImplementedError
      # If no self-edges, then `self.src_indices.size // 2`
      return int((self.src_indices <= self.dst_indices).sum())
  
imports: from __future__ import annotations
  import operator
  from copy import deepcopy
  from typing import TYPE_CHECKING
  import cupy
  import networkx
  import numpy
  import pylibcugraph
  import nx_cugraph
  from ..utils import index_dtype
label_desc: Use image node_id 31 for calling the Graph obj's underlying member method code with example usage: obj.size(weight) and returns: int