public function getCollectionRunner(Collection $collection, int $flags = 0): CollectionRunnerInterface
    {
        $collectionQuery = $collection->getQuery();

        if ($collectionQuery instanceof Query) {
            $queryRunner = $this->getQueryRunner($collectionQuery, $flags);

            return new DynamicCollectionRunner($queryRunner, $this->visibilityResolver);
        }

        return new ManualCollectionRunner($this->visibilityResolver);
    }