'Converts entities from the get response and adds them to the dict.
The Key for the dict will be calculated via
datastore_types.ReferenceToKeyValue.  There will be no entry for entities
that were not found.
Args:
get_response: A datastore_pb.GetResponse or
googledatastore.LookupResponse.
result_dict: The dict to add results to.'

def __add_get_response_entities_to_dict(self, get_response, result_dict):

    if (_CLOUD_DATASTORE_ENABLED and isinstance(get_response, googledatastore.LookupResponse)):
        for result in get_response.found:
            v1_key = result.entity.key
            entity = self.__adapter.pb_v1_to_entity(result.entity, False)
            result_dict[datastore_types.ReferenceToKeyValue(v1_key)] = entity
    else:
        for entity_result in get_response.entity_list():
            if entity_result.has_entity():
                reference_pb = entity_result.entity().key()
                hashable_key = datastore_types.ReferenceToKeyValue(reference_pb)
                entity = self.__adapter.pb_to_entity(entity_result.entity())
                result_dict[hashable_key] = entity
