Maybe, I wound up having to do something similar-ish but not sure if it would be possible to generalize both solutions.