private function fetchResourcesForGivenIds(array $resourceIds, string $type, string $locale = null): array
    {
        $resources = [];
        $resourcePoolOptions = ['locale' => $locale];
        foreach ($resourceIds as $index => $resourceId) {
            if ($this->resourcePool->has($type, $resourceId, $resourcePoolOptions)) {
                $resources[] = $this->resourcePool->get($type, $resourceId, $resourcePoolOptions);

                unset($resourceIds[$index]);
            }
        }

        foreach ($this->createIdChunks($resourceIds) as $chunk) {
            $resources += $this->fetchCollectionFromApi($chunk, $type, $locale);
        }

        return $resources;
    }