Degree of a rational map and the corresponding map between function fields
Let $X$ and $Y$ be two curves defined over $\mathbb{F}_q $ and $f:X \rightarrow Y$ be a separable rational map. Then there is field embedding $$ f^\ast : \mathbb{F}_q (Y) \rightarrow \mathbb{F}_q (X) $$ defined by $f^\ast(\alpha) = \alpha \circ f$. The degree of $f$ is then defined to be $[\mathbb{F}_q (X) : f^\ast(\mathbb{F}_q (Y))]$. If I take two curves $X$ and $Y$ in sagemath over some $\mathbb{F}_q $ in sagemath, is there any way to automatically get the map $f^\ast$ and degree of $f$?