public function markServiceAsPrototype(Definition $definition)
    {
        if (method_exists($definition, 'setShared')) {
            $definition->setShared(false);

            return;
        }

        if (method_exists($definition, 'setScope')) {
            $definition->setScope('prototype');

            return;
        }

        throw new RuntimeException('The visitor could not be marked as unshared');
    }