<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_queue_info(self, instance, cursor):
 """Collects metrics for all queues on the connected database."""

        cursor.execute(self.QUEUE_INFO_STATEMENT)
        for queue_name, ticker_lag, ev_per_sec in cursor:
            yield queue_name, {
                'ticker_lag': ticker_lag,
                'ev_per_sec': ev_per_sec,
            }