code: def test_hidden_nodes(self):
      hide_nodes = [4, 5, 111]
      nodes_gone = nx.filters.hide_nodes(hide_nodes)
      gview = self.gview
      G = gview(self.G, filter_node=nodes_gone)
      assert self.G.nodes - G.nodes == {4, 5}
      assert self.G.edges - G.edges == self.hide_edges_w_hide_nodes
      if G.is_directed():
          assert list(G[3]) == []
          assert list(G[2]) == [3]
      else:
          assert list(G[3]) == [2]
          assert set(G[2]) == {1, 3}
      pytest.raises(KeyError, G.__getitem__, 4)
      pytest.raises(KeyError, G.__getitem__, 112)
      pytest.raises(KeyError, G.__getitem__, 111)
      assert G.degree(3) == (3 if G.is_multigraph() else 1)
      assert G.size() == (7 if G.is_multigraph() else 5)
  
imports: import pytest
  import networkx
  from networkx.utils import edges_equal
label_desc: Use image node_id 2 for calling the TestSubGraphView obj's underlying member method code with example usage: obj.test_hidden_nodes() without return types