<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def select_dict(conn, query: str, params=None, name=None, itersize=5000):
 """Return a select statement's results as dictionary. Parameters conn : database connection query : select query string params : query parameters. name : server side cursor name. defaults to client side. itersize : number of records fetched by server. """


    with conn.cursor(name, cursor_factory=RealDictCursor) as cursor:
        cursor.itersize = itersize
        cursor.execute(query, params)

        for result in cursor:
            yield result