def METHOD_NAME(self):
    # Test items access on a NodeList.
    # First, use an empty NodeList.
    node_list = NodeList()
    self.assertIsNone(node_list.item(0))
    self.assertIsNone(node_list.item(-1))
    with self.assertRaises(IndexError):
        node_list[0]
    with self.assertRaises(IndexError):
        node_list[-1]
    # Now, use a NodeList with items.
    node_list.append(111)
    node_list.append(999)
    self.assertEqual(node_list.item(0), 111)
    self.assertIsNone(node_list.item(-1)) # invalid item
    self.assertEqual(node_list[0], 111)
    self.assertEqual(node_list[-1], 999)