def get_local_transform(self):
        """Returns an :class:`.euclid.Matrix3` with the local transformation matrix

        Returns:
            euclid.Matrix3
        """
        if self.is_transform_dirty:

            matrix = euclid.Matrix3().identity()

            matrix.translate(self._x, self._y)
            matrix.translate(self.transform_anchor_x, self.transform_anchor_y)
            matrix.rotate(math.radians(-self.rotation))
            matrix.scale(self._scale * self._scale_x, self._scale * self._scale_y)
            matrix.translate(-self.transform_anchor_x, -self.transform_anchor_y)

            self.is_transform_dirty = False

            self.transform_matrix = matrix

        return self.transform_matrix
dataset/ETHPy150Open los-cocos/cocos/cocos/cocosnode.py/CocosNode.get_local_transform/original