def METHOD_NAME(self) -> None:
    """Checks that the argument is a square matrix.
    """
    if not self.args[0].ndim == 2 or self.args[0].shape[0] != self.args[0].shape[1]:
        raise ValueError(
            "Argument to upper_tri must be a square matrix."
        )