private void checkTypeSignature(List<Type> expectedArgs, List<Expression> actualArguments, Scope<Type> scope)
            throws InnerParseError {
        if (expectedArgs.size() != actualArguments.size()) {
            throw new InnerParseError(
                    String.format(
                            "Expected %s arguments but found %s",
                            expectedArgs.size(),
                            actualArguments));
        }
        for (int i = 0; i < expectedArgs.size(); i++) {
            Type expected = expectedArgs.get(i);
            Type actual = actualArguments.get(i).typeCheck(scope);
            if (!expected.isA(actual)) {
                Type optAny = Type.optionalType(Type.anyType());
                String hint = "";
                if (actual.isA(optAny) && !expected.isA(optAny)
                        && actual.expectOptionalType().inner().equals(expected)) {
                    hint = String.format(
                            "hint: use `assign` in a condition or `isSet(%s)` to prove that this value is non-null",
                            actualArguments.get(i));
                    hint = StringUtils.indent(hint, 2);
                }
                throw new InnerParseError(
                        String.format(
                                "Unexpected type in the %s argument: Expected %s but found %s%n%s",
                                ordinal(i + 1),
                                expected,
                                actual,
                                hint));
            }
        }
    }
@return The arguments to this function
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/syntax/expressions/functions/LibraryFunction.java