code: def get_queue_sizes(self, 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))
docs: 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.