code: def test_generate_matrix(self):
      dtype = self.dtype
      x_shape, s_shape = self.x_s_shapes
      sv = self.xp.random.uniform(0.5, 1.5, s_shape).astype(
          dtype().real.dtype
      )
      x = testing.generate_matrix(
          x_shape, xp=self.xp, dtype=dtype, singular_values=sv
      )
      assert x.shape == x_shape
  
      if 0 in x_shape:
          return
  
      s = self.xp.linalg.svd(
          x.astype(numpy.complex128),
          full_matrices=False,
          compute_uv=False,
      )
      sv = self.xp.broadcast_to(sv, s.shape)
      sv_sorted = self.xp.sort(sv, axis=-1)[..., ::-1]
  
      rtol = 1e-3 if dtype == numpy.float16 else 1e-7
      self.xp.testing.assert_allclose(s, sv_sorted, rtol=rtol)
  
imports: import unittest
  import numpy
  import pytest
  import cupy
  from cupy import testing
label_desc: Use image node_id 1 for calling the TestGenerateMatrix obj's underlying member method code with example usage: obj.test_generate_matrix() without return types