def METHOD_NAME():
    t = IndexedTree[MyDataType](MyDataType('root'), attrgetter('name'))
    a = t.add('root', MyDataType('a'))
    b = t.add('root', MyDataType('b'))
    assert id(a) == id(t['a'])
    assert id(b) == id(t['b'])
    assert repr(t['root'].nodes) == "[Node(MyDataType('a')), Node(MyDataType('b'))]"
    assert t.root.nodes[0].parent is t.root
    assert t.root.nodes[1].parent is t.root
    t.add('a', MyDataType('a1'))
    assert repr(t['a'].nodes) == "[Node(MyDataType('a1'))]"
    assert t.root.nodes[0].nodes[0].parent is t.root.nodes[0]
    found = []
    t.root.walk(lambda n: found.append(n.data))
    assert repr(found) == "[MyDataType('root'), MyDataType('a'), MyDataType('a1'), MyDataType('b')]"