title: Converting python object to String, edit it and convert back to original kind of object
body: <p>Good evening, I have python object of this type. Is here any way to convert it to String, edit, and convert back?       </p>
  
  <pre><code> &lt;class 'matplotlib.transforms.CompositeGenericTransform'&gt;
  </code></pre>
  
  <p>When I print it by print(variable) it looks like this: </p>
  
  <pre><code>CompositeGenericTransform(CompositeGenericTransform(CompositeGenericTransform(CompositeGenericTransform(CompositeGenericTransform(TransformWrapper(BlendedAffine2D(IdentityTransform(),IdentityTransform())), CompositeGenericTransform(BboxTransformFrom(TransformedBbox(Bbox('array([[ -19.5      ,  -10.7983871],\n       [ 221.5      ,  140.7983871]])'), TransformWrapper(BlendedAffine2D(IdentityTransform(),IdentityTransform())))), BboxTransformTo(TransformedBbox(Bbox('array([[ 0.125,  0.25 ],\n       [ 0.9  ,  0.9  ]])'), BboxTransformTo(TransformedBbox(Bbox('array([[ 0.,  0.],\n       [ 8.,  6.]])'), Affine2D(array([[ 80.,   0.,   0.],
         [  0.,  80.,   0.],
         [  0.,   0.,   1.]])))))))), Affine2D(array([[ 0.99968918, -0.02493069,  6.98903935],
         [ 0.02493069,  0.99968918, -8.59039721],
         [ 0.        ,  0.        ,  1.        ]]))), Affine2D(array([[ 0.99968918, -0.02493069,  6.93499095],
         [ 0.02493069,  0.99968918, -7.14592338],
         [ 0.        ,  0.        ,  1.        ]]))), Affine2D(array([[ 0.99968918, -0.02493069,  6.88226449],
         [ 0.02493069,  0.99968918, -6.30113809],
         [ 0.        ,  0.        ,  1.        ]]))), Affine2D(array([[ 0.99968918, -0.02493069,  6.96735103],
         [ 0.02493069,  0.99968918, -7.27368166],
         [ 0.        ,  0.        ,  1.        ]])))
  </code></pre>