code: def test_add_edges_from_weight(self):
      self.graph.add_edges_from(
          [("b", "c"), ("c", "d")], weights=[0.5, 0.6]
      )
      if nx.__version__.startswith("1"):
          self.assertEqual(self.graph.edge["b"]["c"]["weight"], 0.5)
          self.assertEqual(self.graph.edge["c"]["d"]["weight"], 0.6)
  
          self.graph.add_edges_from([("e", "f")])
          self.assertEqual(self.graph.edge["e"]["f"]["weight"], None)
      else:
          self.assertEqual(self.graph.adj["b"]["c"]["weight"], 0.5)
          self.assertEqual(self.graph.adj["c"]["d"]["weight"], 0.6)
  
          self.graph.add_edges_from([("e", "f")])
          self.assertEqual(self.graph.adj["e"]["f"]["weight"], None)
  
imports: import unittest
  import networkx
  import numpy
  import pgmpy.tests.help_functions
  from pgmpy.base import DAG, PDAG
label_desc: Use image node_id 15 for calling the TestDAGCreation obj's underlying member method code with example usage: obj.test_add_edges_from_weight() without return types