Add wrapping function for externally defined-contexts.