<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def fetch_and_index(self, fetch_func):
        "Fetch data with func, return dict indexed by ID"
        data, e = fetch_func()
        if e: raise e
        yield {row['id']: row for row in data}