'Acquire the desired quota, if any.
This is not thread-safe so should be called while locked.
Args:
who: [string] Who is asking, for logging purposes.
quota: [dict] The desired quota for each keyed resource, if any.
Returns:
The quota acquired if successful, or None if not.'

def acquire_all_or_none_unsafe(self, who, quota):

    if (not quota):
        return {}
    logging.info('"%s"    attempting    to    acquire    quota    %s', who, quota)
    acquired = {}
    for (key, value) in quota.items():
        got = self.__acquire_resource_or_none(key, value)
        if (not got):
            self.release_all_unsafe(who, acquired)
            return None
        acquired[key] = got
    return acquired
