docstr: Test degenerate eigenvalues like zero-valued and with 2-/3-multiplicity
docstr_tok: ["Test","degenerate","eigenvalues","like","zero-valued","and","with","2-\/3-multiplicity"]
code: def _test_degenerate_eigenvalues(self, device):
      """
      Test degenerate eigenvalues like zero-valued and with 2-/3-multiplicity
      """
      # Error tolerances for degenerate values are increased as things might become
      #  numerically unstable
      deg_atol = 1e-3
      deg_rtol = 1.0
  
      # Construct random orthonormal sets
      test_eigenvecs = random_rotations(
          n=self.TEST_BATCH_SIZE, device=device
      )
  
      # Construct random eigenvalues
      test_eigenvals = torch.randn(
          (self.TEST_BATCH_SIZE, 3), device=test_eigenvecs.device
      )
      self._test_eigenvalues_and_eigenvectors(
          test_eigenvecs, test_eigenvals, atol=deg_atol, rtol=deg_rtol
      )
  
      # First eigenvalue is always 0.0 here: [0.0 X Y]
      test_eigenvals_with_zero = test_eigenvals.clone()
      test_eigenvals_with_zero[..., 0] = 0.0
      self._test_eigenvalues_and_eigenvectors(
          test_eigenvecs,
          test_eigenvals_with_zero,
          atol=deg_atol,
          rtol=deg_rtol,
      )
  
      # First two eigenvalues are always the same here: [X X Y]
      test_eigenvals_with_multiplicity2 = test_eigenvals.clone()
      test_eigenvals_with_multiplicity2[
          ..., 1
      ] = test_eigenvals_with_multiplicity2[..., 0]
      self._test_eigenvalues_and_eigenvectors(
          test_eigenvecs,
          test_eigenvals_with_multiplicity2,
          atol=deg_atol,
          rtol=deg_rtol,
      )
  
      # All three eigenvalues are the same here: [X X X]
      test_eigenvals_with_multiplicity3 = (
          test_eigenvals_with_multiplicity2.clone()
      )
      test_eigenvals_with_multiplicity3[
          ..., 2
      ] = test_eigenvals_with_multiplicity2[..., 0]
      self._test_eigenvalues_and_eigenvectors(
          test_eigenvecs,
          test_eigenvals_with_multiplicity3,
          atol=deg_atol,
          rtol=deg_rtol,
      )
  
imports: import unittest
  import torch
  from pytorch3d.common.workaround import symeig3x3
  from pytorch3d.transforms.rotation_conversions import random_rotations
  from .common_testing import get_random_cuda_device, TestCaseMixin
label_desc: Use image node_id 22 for calling the TestSymEig3x3 obj's underlying member method code with example usage: obj._test_degenerate_eigenvalues(device) without return types