Check if blobs for the given digests already exist.

def CheckBlobsExist(self, blob_ids):
    """Check if blobs for the given digests already exist."""
    res = {blob_id: False for blob_id in blob_ids}

    urns = {self._BlobUrn(blob_id): blob_id for blob_id in blob_ids}

    existing = aff4.FACTORY.MultiOpen(
        urns, aff4_type=aff4.AFF4MemoryStreamBase, mode="r")

    for blob in existing:
      res[urns[blob.urn]] = True

    return res