def wait_futures(future_list):
    '\n   Wait for all of a list of futures to finish.\n   Works with FutureWrapper.\n   '
    ret = []
    futs = []
    for f in future_list:
        if (f is None):
            continue
        if ((not isinstance(f, ndb.Future)) and (not isinstance(f, FutureWrapper))):
            ret.append(FutureWrapper(f))
        else:
            futs.append(f)
    ndb.Future.wait_all(futs)
    return (futs + ret)
Wait for all of a list of futures to finish.
Works with FutureWrapper.
def wait_futures(future_list):
    '\n   Wait for all of a list of futures to finish.\n   Works with FutureWrapper.\n   '
    ret = []
    futs = []
    for f in future_list:
        if (f is None):
            continue
        if ((not isinstance(f, ndb.Future)) and (not isinstance(f, FutureWrapper))):
            ret.append(FutureWrapper(f))
        else:
            futs.append(f)
    ndb.Future.wait_all(futs)
    return (futs + ret)