code: def test_diagonal_sum(self, n_points, atol):
      mat = self.data_generator.random_square_mat(n_points)
  
      diag = Matrices.diagonal(mat)
  
      sum_diag = gs.sum(diag, axis=-1)
      trace = gs.trace(mat)
      self.assertAllClose(sum_diag, trace, atol=atol)
  
imports: import pytest
  import geomstats.backend
  from geomstats.geometry.matrices import Matrices
  from geomstats.test.test_case import TestCase
  from geomstats.test.vectorization import generate_vectorization_data
  from geomstats.test_cases.geometry.base import MatrixVectorSpaceTestCase
  from geomstats.test_cases.geometry.euclidean import EuclideanMetricTestCase
label_desc: Use image node_id 18 for calling the MatrixOperationsTestCase obj's underlying member method code with example usage: obj.test_diagonal_sum(n_points, atol) without return types