public static function resolveHelper(&$context, &$vars) {
        if (count($vars[0]) !== 1) {
            return false;
        }
        if (isset($context['helpers'][$vars[0][0]])) {
            return true;
        }

        if ($context['helperresolver']) {
            $helper = $context['helperresolver']($context, $vars[0][0]);
            if ($helper) {
                $context['helpers'][$vars[0][0]] = $helper;
                return true;
            }
        }

        return false;
    }