'Retrieve all assets in `sids`.
Parameters
sids : iterable of int
Assets to retrieve.
default_none : bool
If True, return None for failed lookups.
If False, raise `SidsNotFound`.
Returns
assets : list[Asset or None]
A list of the same length as `sids` containing Assets (or Nones)
corresponding to the requested sids.
Raises
SidsNotFound
When a requested sid is not found and default_none=False.'

def retrieve_all(self, sids, default_none=False):

    (hits, missing, failures) = ({}, set(), [])
    for sid in sids:
        try:
            asset = self._asset_cache[sid]
            if ((not default_none) and (asset is None)):
                raise SidsNotFound(sids=[sid])
            hits[sid] = asset
        except KeyError:
            missing.add(sid)
    if (not missing):
        return [hits[sid] for sid in sids]
    update_hits = hits.update
    type_to_assets = self.group_by_type(missing)
    failures = {failure: None for failure in type_to_assets.pop(None, ())}
    update_hits(failures)
    self._asset_cache.update(failures)
    if (failures and (not default_none)):
        raise SidsNotFound(sids=list(failures))
    update_hits(self.retrieve_equities(type_to_assets.pop('equity', ())))
    update_hits(self.retrieve_futures_contracts(type_to_assets.pop('future', ())))
    if type_to_assets:
        raise AssertionError(('Found    asset    types:    %s' % list(type_to_assets.keys())))
    return [hits[sid] for sid in sids]
