class ExtensionConfigurationModule implements Module {

    private final CoreExtensionEntry extension;
    private final Iterable<ValueSource> valueSources;

    public ExtensionConfigurationModule(CoreExtensionEntry extension, ValueSource... valueSources) {
        this.extension = extension;
        this.valueSources = Arrays.asList(valueSources);
    }

    @Override
    public void configure(Binder binder) {<FILL_FUNCTION_BODY>}

    class Interpolator extends MavenTransformer {
        final StringSearchInterpolator interpolator;

        Interpolator() {
            super(null);
            interpolator = new StringSearchInterpolator();
            interpolator.setCacheAnswers(true);
            valueSources.forEach(interpolator::addValueSource);
        }

        public XmlNode transform(XmlNode node) {
            return super.transform(node);
        }

        protected String transform(String str) {
            try {
                return interpolator.interpolate(str);
            } catch (InterpolationException e) {
                throw new RuntimeException(e);
            }
        }
    }
}

        if (extension.getKey() != null) {
            XmlNode configuration = extension.getConfiguration();
            if (configuration == null) {
                configuration = new XmlNodeImpl("configuration");
            }
            configuration = new Interpolator().transform(configuration);

            binder.bind(XmlNode.class)
                    .annotatedWith(Names.named(extension.getKey()))
                    .toInstance(configuration);
            binder.bind(PlexusConfiguration.class)
                    .annotatedWith(Names.named(extension.getKey()))
                    .toInstance(XmlPlexusConfiguration.toPlexusConfiguration(configuration));
        }
    
<no_super_class>