@classmethod
  def fetch_async(cls, queue_or_queues, rpc=None):
    """Asynchronously get the queue details for multiple queues.

    Args:
      queue_or_queues: An iterable of Queue instances, or an iterable of
          strings corresponding to queue names, or a Queue instance or a string
          corresponding to a queue name.
      rpc: An optional UserRPC object.

    Returns:
      A UserRPC object, call get_result to complete the RPC and obtain the
      result.

      If an iterable (other than string) is provided as input, the result will
      be a list of of QueueStatistics objects, one for each queue in the order
      requested.

      Otherwise, if a single item was provided as input, then the result will be
      a single QueueStatistics object.

    Raises:
      TypeError: If queue_or_queues is not one of: Queue instance, string, an
          iterable containing only Queue instances or an iterable containing
          only strings.
    """
    wants_list = True


    if isinstance(queue_or_queues, basestring):
      queue_or_queues = [queue_or_queues]
      wants_list = False

    try:
      queues_list = [queue for queue in queue_or_queues]
    except __HOLE__:
      queues_list = [queue_or_queues]
      wants_list = False

    contains_strs = any(isinstance(queue, basestring) for queue in queues_list)
    contains_queues = any(isinstance(queue, Queue) for queue in queues_list)

    if contains_strs and contains_queues:
      raise TypeError('queue_or_queues must contain either strings or Queue '
                      'instances, not both.')

    if contains_strs:
      queues_list = [Queue(queue_name) for queue_name in queues_list]

    return cls._FetchMultipleQueues(queues_list, wants_list, rpc)
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/api/taskqueue/taskqueue.py/QueueStatistics.fetch_async