'Gets Entity records from a remote endpoint over HTTP.
Args:
key_range_item: Range of keys to get.
key_factory: Used for dependency injection.
keys_only: bool, default False, only get keys values
retry_parallel: bool, default False, to try a parallel download despite
past parallel download failures.
Returns:
A DownloadResult instance.
Raises:
ConfigurationError: if no Exporter is defined for key_range_item.kind'

def GetEntities(self, key_range_item, key_factory=datastore.Key, keys_only=False, retry_parallel=False):

    keys = []
    entities = []
    kind = key_range_item.kind
    if retry_parallel:
        self.parallel_download = True
    if self.parallel_download:
        query = key_range_item.key_range.make_directed_datastore_query(kind, keys_only=keys_only)
        try:
            results = self._QueryForPbs(query)
        except datastore_errors.NeedIndexError:
            logger.info('%s:    No    descending    index    on    __key__,    performing    serial    download', kind)
            self.parallel_download = False
    if (not self.parallel_download):
        key_range_item.key_range.direction = key_range_module.KeyRange.ASC
        query = key_range_item.key_range.make_ascending_datastore_query(kind, keys_only=keys_only)
        results = self._QueryForPbs(query)
    size = len(results)
    for entity in results:
        key = key_factory()
        key._Key__reference = entity.key()
        entities.append(entity)
        keys.append(key)
    continued = (size == self.batch_size)
    key_range_item.count = size
    return DownloadResult(continued, key_range_item.key_range.direction, keys, entities)
