docstr: get_target_subgraph should be able to run more than once
docstr_tok: ["get_target_subgraph","should","be","able","to","run","more","than","once"]
code: def test_get_target_subgraph_twice(self):
      """get_target_subgraph should be able to run more than once"""
  
      sm = StructureModel()
      sm.add_edges_from([(0, 1), (1, 2), (1, 3), (4, 6)])
  
      subgraph = sm.get_target_subgraph(0)
      subgraph.remove_edge(0, 1)
      subgraph = subgraph.get_target_subgraph(1)
  
      expected_graph = StructureModel()
      expected_edges = [(1, 2), (1, 3)]
      expected_graph.add_edges_from(expected_edges)
  
      assert set(subgraph.nodes) == set(expected_graph.nodes)
      assert set(subgraph.edges) == set(expected_graph.edges)
  
imports: import pytest
  from networkx.exception import NodeNotFound
  from causalnex.structure import StructureModel
label_desc: Use image node_id 8 for calling the TestStructureModelGetTargetSubgraph obj's underlying member method code with example usage: obj.test_get_target_subgraph_twice() without return types