Alex Tomasello seems like you have an idea how this could be implemented. If you provide a PR for this, I can give it a shot and try to integrate this.