<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_each(conn, query: str, parameter_groups, name=None):
 """Run select query for each parameter set in single transaction."""


    with conn:
        with conn.cursor(name=name) as cursor:
            for parameters in parameter_groups:
                cursor.execute(query, parameters)
                yield cursor.fetchone()