static TraitFactory createServiceFactory(Iterable<TraitService> services) {
        Map<ShapeId, TraitService> serviceMap = new HashMap<>();
        services.forEach(service -> serviceMap.put(service.getShapeId(), service));
        return (name, target, value) -> Optional.ofNullable(serviceMap.get(name))
                .map(provider -> provider.createTrait(target, value));
    }
Creates a TraitFactory that uses a List of TraitService provider instances.

@param services List of TraitService provider instances.
@return Returns the created TraitFactory.
smithy-model/src/main/java/software/amazon/smithy/model/traits/TraitFactory.java