code: def test_shown_edges(self):
      show_edges = [(2, 3), (8, 7), (222, 223)]
      edge_subgraph = self.show_edges_filter(show_edges)
      G = self.gview(self.G, filter_edge=edge_subgraph)
      assert self.G.nodes == G.nodes
      if G.is_directed():
          assert G.edges == {(2, 3)}
          assert list(G[3]) == []
          assert list(G[2]) == [3]
          assert list(G.pred[3]) == [2]
          assert list(G.pred[2]) == []
          assert G.size() == 1
      else:
          assert G.edges == {(2, 3), (7, 8)}
          assert list(G[3]) == [2]
          assert list(G[2]) == [3]
          assert G.size() == 2
      pytest.raises(KeyError, G.__getitem__, 221)
      pytest.raises(KeyError, G.__getitem__, 222)
      assert G.degree(3) == 1
  
imports: import pytest
  import networkx
  from networkx.utils import edges_equal
label_desc: Use image node_id 5 for calling the TestSubGraphView obj's underlying member method code with example usage: obj.test_shown_edges() without return types