private static Map<Pair<QName, Integer>, Function> getProvidedFunctions(ContextType contextType) {
    final Map<Pair<QName, Integer>, Function> map = new HashMap<>();
    final List<Pair<QName, ? extends Function>> availableFunctions = XPathFunctionProvider.getAvailableFunctions(contextType);
    for (Pair<QName, ? extends Function> pair : availableFunctions) {
      map.put(Pair.create(pair.first, pair.second.getParameters().length), pair.second);
    }
    return Collections.unmodifiableMap(map);
  }
private static Map<Pair<QName, Integer>, Function> getProvidedFunctions(ContextType contextType)