public static function process(ArrayResolver $config)
    {
        $copy = $config->extract();
        $instances = $config->resolveArray('apply-templates', []);

        foreach ($instances as $name => $instance) {
            self::processTemplate($config, $copy, $name, $instance);
        }

        return new ArrayResolver($copy);
    }