code: private function fetchCollection(string $type, array $locales): \Generator
      {
          foreach ($locales as $locale) {
              $skip = 0;
              do {
                  $query = (new Query())
                      ->setLocale($locale)
                      ->setLimit(1000)
                      ->setSkip($skip)
                  ;
                  $resources = 'Entry' === $type
                      ? $this->client->getEntries($query)
                      : $this->client->getAssets($query);
  
                  foreach ($resources as $resource) {
                      yield $resource;
                  }
  
                  $skip += 1000;
              } while ($resources->getTotal() > $resources->getSkip() + 1000);
          }
      }
docs: @param string   $type    Either 'Entry' or 'Asset'
  @param string[] $locales
  
  @return \Generator