Get a Variable from RooAbsPdf in PyROOT

Hi @jonas, thanks for the suggestion.
Unfortunately I don’t get from your function: do you release Python or ROOT ownership?
I would like my fit results to be copied (via Python’s copy.deepcopy). And ideally pickled when needed.
Would your function solve that or should I do something else?
I can open a new topic if needed.
Thank you in advance.

UPD: I created a similar topic on copying and memory management: