How to extract relay.Constant value?

Yes, the problem is not because of cnpy; cnpy saves the right data so you can use this method securely.