What is the purpose of this exercise? May be it is an XY problem and your needs can be fulfilled in a better way.
Even if you find a way to do what you have asked, what you are going to do with the results? If we know before and after, we may direct you to a better version of answer.