code: def test_from_vector_to_diagonal_matrix(
      self,
      vector,
      expected,
      atol,
      num_diag=0,
  ):
      res = utils.from_vector_to_diagonal_matrix(
          vector, num_diag=num_diag
      )
      self.assertAllClose(res, expected, atol=atol)
  
file_path: geomstats/geomstats/test_cases/algebra_utils.py
imports: import math
  import pytest
  import geomstats.algebra_utils
  import geomstats.backend
  from geomstats.geometry.hypersphere import Hypersphere
  from geomstats.test.test_case import TestCase
label_desc: Use image node_id 2 for calling the AlgebraUtilsTestCase obj's underlying member method code with example usage: obj.test_from_vector_to_diagonal_matrix(vector, expected, atol, num_diag) without return types