'Fetch events from the caches
Args:
events (list(str)): list of event_ids to fetch
allow_rejected (bool): Whether to teturn events that were rejected
update_metrics (bool): Whether to update the cache hit ratio metrics
Returns:
dict of event_id -> _EventCacheEntry for each event_id in cache. If
allow_rejected is `False` then there will still be an entry but it
will be `None`'

def _get_events_from_cache(self, events, allow_rejected, update_metrics=True):

    event_map = {}
    for event_id in events:
        ret = self._get_event_cache.get((event_id,), None, update_metrics=update_metrics)
        if (not ret):
            continue
        if (allow_rejected or (not ret.event.rejected_reason)):
            event_map[event_id] = ret
        else:
            event_map[event_id] = None
    return event_map
