protected function randomizeSamples($referencePrefix, array $samples, $limit = 1)
    {
        $sample = array_rand($samples, $limit);
        
        if (1 === $limit) {
            $referenceName = sprintf('%s_%s', $referencePrefix, $samples[$sample]);
            
            return $this->getReference($referenceName);
        } else {
            $collection = new ArrayCollection();
            foreach ($sample as $index) {
                $referenceName = sprintf('%s_%s', $referencePrefix, $samples[$index]);
                $collection->add($this->getReference($referenceName));
            }
            
            return $collection;
        }
    }