code: def test_add_edge_weight(self):
      self.graph.add_edge("a", "b", weight=0.3)
      if nx.__version__.startswith("1"):
          self.assertEqual(self.graph.edge["a"]["b"]["weight"], 0.3)
      else:
          self.assertEqual(self.graph.adj["a"]["b"]["weight"], 0.3)
  
imports: import unittest
  import networkx
  import numpy
  import pgmpy.tests.help_functions
  from pgmpy.base import DAG, PDAG
label_desc: Use image node_id 14 for calling the TestDAGCreation obj's underlying member method code with example usage: obj.test_add_edge_weight() without return types