def METHOD_NAME(self):
    # Test pickling and unpickling of a NodeList.
    for proto in range(pickle.HIGHEST_PROTOCOL + 1):
        # Empty NodeList.
        node_list = NodeList()
        pickled = pickle.dumps(node_list, proto)
        unpickled = pickle.loads(pickled)
        self.assertIsNot(unpickled, node_list)
        self.assertEqual(unpickled, node_list)
        # Non-empty NodeList.
        node_list.append(1)
        node_list.append(2)
        pickled = pickle.dumps(node_list, proto)
        unpickled = pickle.loads(pickled)
        self.assertIsNot(unpickled, node_list)
        self.assertEqual(unpickled, node_list)