human
I am working on the file "Python Quick Reference/Data Algorithms.ipynb".
The first task is:
2. Delegating Iterator
Can you write Python code for it?
 ... Give me a the Python code you requested?
assistant
#Here is the Python code you requested.

# if you write a container class, and want to expose an iterator over an internal collection use the __iter()__ method
class Node:
    def __init__(self):
        self._children = [1,2,3]
    def __iter__(self):
        return iter(self._children)

root = Node()
for x in root:
    print(x)