docstr: The subgraph returned should still have the edge data preserved from the original graph
docstr_tok: ["The","subgraph","returned","should","still","have","the","edge","data","preserved","from","the","original","graph"]
code: def test_different_origins_and_weights(self):
      """The subgraph returned should still have the edge data preserved from the original graph"""
  
      sm = StructureModel()
      sm.add_weighted_edges_from([(1, 2, 2.0)], origin="unknown")
      sm.add_weighted_edges_from([(1, 3, 1.0)], origin="learned")
      sm.add_weighted_edges_from([(5, 6, 0.7)], origin="expert")
  
      subgraph = sm.get_target_subgraph(2)
  
      assert set(subgraph.edges.data("origin")) == {
          (1, 2, "unknown"),
          (1, 3, "learned"),
      }
      assert set(subgraph.edges.data("weight")) == {
          (1, 2, 2.0),
          (1, 3, 1.0),
      }
  
imports: import pytest
  from networkx.exception import NodeNotFound
  from causalnex.structure import StructureModel
label_desc: Use image node_id 6 for calling the TestStructureModelGetTargetSubgraph obj's underlying member method code with example usage: obj.test_different_origins_and_weights() without return types