### How to define group actions on sagemath?

Hello everyone, I hope you are ~~well.
~~well.

I have the following problem and I'm having difficulties to make this implementation in ~~sage.
Problem:
~~sage.

Problem:

Consider $f \in \mathbb{R}[x,y]$ and $M \in M_{2}(\mathbb{R})$. How can I implement the $M \cdot f (x,y)=f(M^{-1}(x,y))$ group action in sage?

I took a look at the ~~link: https://doc . sagemath . org/html/en/reference/coercion/sage/categories/action . html
~~link:

- https://doc.sagemath.org/html/en/reference/coercion/sage/categories/action.html

But I couldn't understand much.

I thank you for your attention.