code: def transformBy(self, matrix, origin=None):
          
          matrix = normalizers.normalizeTransformationMatrix(matrix)
          if origin is None:
              origin = (0, 0)
          origin = normalizers.normalizeCoordinateTuple(origin)
          if origin is not None:
              t = transform.Transform()
              oX, oY = origin
              t = t.translate(oX, oY)
              t = t.transform(matrix)
              t = t.translate(-oX, -oY)
              matrix = tuple(t)
          self._transformBy(matrix)
docs: Transform the object.
  
              >>> obj.transformBy((0.5, 0, 0, 2.0, 10, 0))
              >>> obj.transformBy((0.5, 0, 0, 2.0, 10, 0), origin=(500, 500))
  
          **matrix** must be a :ref:`type-transformation`.
          **origin** defines the point at with the transformation
          should originate. It must be a :ref:`type-coordinate`
          or ``None``. The default is ``(0, 0)``.