You need to set up the transformation: It is not always obvious how that works but google will help you.
Here is an example that scales 200% from X=200. It’s kind of like move the hole thing away from the origin, then scale (or rotate) and then move it back.
from Foundation import NSAffineTransform
Transform = NSAffineTransform.transform()
Transform.translateXBy_yBy_(200, 0)
Transform.scaleBy_(2)
Transform.translateXBy_yBy_(200, 0)
Layer.applyTransform(Transform.transformStruct())