### Does SAGE have already an implemented version of the "Affine Diagonalization Algorithm" in general for n-dimensional vector spaces?

I would like to ask the following question:

Does SAGE have already an implemented version of the "Affine Diagonalization Algorithm" in general for n-dimensional vector spaces?

I have found some pseudo-code, see page 15 (the section begins on page 12) of

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwiXnbDYj6LuAhWRCOwKHbGWB3AQFjAAegQIARAC&url=https%3A%2F%2Fcs.nyu.edu%2Fyap%2Fbks%2Fegc%2F09%2F21Surfaces.pdf&usg=AOvVaw2RbQdKtBcO6LhKj-C32LpN

.

Searching online led me also to this answer from 2008 where someone does it with MAPLE (see https://www.mapleprimes.com/posts/38766-Normal-Forms-For-Quadratic-Functions), but, unfortunately, I cannot open
the .mws-file (I got an error message concerning the version number (?)).

Thank you very much for the help.