code: def fetch_group(group_id, failures=True, wait=0, count=None, cached=Conf.CACHED):
      
      if cached:
          return fetch_group_cached(group_id, failures, wait, count)
      start = time()
      if count:
          while True:
              if count_group(group_id) == count or wait and (time() - start) * 1000 >= wait >= 0:
                  break
              sleep(0.01)
      while True:
          r = Task.get_task_group(group_id, failures)
          if r:
              return r
          if (time() - start) * 1000 >= wait >= 0:
              break
          sleep(0.01)
docs: Return a list of Tasks for a task group.
  
      :param str group_id: the group id
      :param bool failures: set to False to exclude failures
      :param bool cached: run this against the cache backend
      :return: list of Tasks