code: def _transformBy(self, matrix, **kwargs):
          
          t = transform.Transform(*matrix)
          # coordinates
          x, y = t.transformPoint((self.x, self.y))
          self.x = x
          self.y = y
          # angle
          angle = math.radians(-self.angle)
          dx = math.cos(angle)
          dy = math.sin(angle)
          tdx, tdy = t.transformPoint((dx, dy))
          ta = math.atan2(tdy - t[5], tdx - t[4])
          self.angle = -math.degrees(ta)
docs: This is the environment implementation of
          :meth:`BaseGuideline.transformBy`.
  
          **matrix** will be a :ref:`type-transformation`.
          that has been normalized with :func:`normalizers.normalizeTransformationMatrix`.
  
          Subclasses may override this method.