code: def test_nbunch_is_list(self):
      G = self.G()
      G.add_nodes_from(list("ABCD"))
      G.add_nodes_from(self.P3)  # add nbunch of nodes (nbunch=Graph)
      assert sorted(G.nodes(), key=str) == [1, 2, 3, "A", "B", "C", "D"]
      G.remove_nodes_from(
          self.P3
      )  # remove nbunch of nodes (nbunch=Graph)
      assert sorted(G.nodes(), key=str) == ["A", "B", "C", "D"]
  
imports: import pytest
  import networkx
  from networkx import convert_node_labels_to_integers
  from networkx.utils import edges_equal, nodes_equal
label_desc: Use image node_id 8 for calling the HistoricalTests obj's underlying member method code with example usage: obj.test_nbunch_is_list() without return types