<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_sizes(self, queue):
 """ Get the queue's number of tasks in each state. Returns dict with queue size for the QUEUED, SCHEDULED, and ACTIVE states. Does not include size of error queue. """


        states = [QUEUED, SCHEDULED, ACTIVE]
        pipeline = self.connection.pipeline()
        for state in states:
            pipeline.zcard(self._key(state, queue))
        results = pipeline.execute()
        return dict(zip(states, results))