class InternalContext {

    private Map<Object, ConstructionContext<?>> constructionContexts = new HashMap<>();
    private Dependency dependency;

    @SuppressWarnings("unchecked")
    public <T> ConstructionContext<T> getConstructionContext(Object key) {<FILL_FUNCTION_BODY>}

    public Dependency getDependency() {
        return dependency;
    }

    public void setDependency(Dependency dependency) {
        this.dependency = dependency;
    }
}

        ConstructionContext<T> constructionContext
                = (ConstructionContext<T>) constructionContexts.get(key);
        if (constructionContext == null) {
            constructionContext = new ConstructionContext<>();
            constructionContexts.put(key, constructionContext);
        }
        return constructionContext;
    
<no_super_class>