code: def test_size(self):
      G = self.K3
      assert G.size() == 6
      assert G.number_of_edges() == 6
      G.add_edge(0, 1, weight=0.3, other=1.2)
      assert round(G.size(weight="weight"), 2) == 6.3
      assert round(G.size(weight="other"), 2) == 7.2
  
imports: from collections import UserDict
  import pytest
  import networkx
  from networkx.utils import edges_equal
  from .test_multigraph import BaseMultiGraphTester
  from .test_multigraph import TestEdgeSubgraph
  from .test_multigraph import TestMultiGraph
label_desc: Use image node_id 20 for calling the BaseMultiDiGraphTester obj's underlying member method code with example usage: obj.test_size() without return types