from __future__ import annotations

import ulab

def trace(m: ulab.numpy.ndarray) -> float:
    """
    :param m: a square matrix

    Compute the trace of the matrix, the sum of its diagonal elements."""
    ...
