The issue is most likely caused by a typo in:
def _iter_(self):

since two underscores are expected:
def __iter__(self):

PS: you can post code snippets by wrapping them into three backticks ```, which makes debugging easier.