code: def test_cuda(
      self,
      test_case_description,
      mixture_count,
      class_count,
      features,
      labels,
      expected,
  ):
      # Device to run on
      device = torch.device("cuda")
  
      # Create tensors
      features_tensor = torch.tensor(
          features, dtype=torch.float32, device=device
      )
      labels_tensor = torch.tensor(
          labels, dtype=torch.int32, device=device
      )
  
      # Create GMM
      gmm = GaussianMixtureModel(
          features_tensor.size(1),
          mixture_count,
          class_count,
          verbose_build=True,
      )
      # reload GMM to confirm the build
      _ = GaussianMixtureModel(
          features_tensor.size(1),
          mixture_count,
          class_count,
          verbose_build=False,
      )
      # reload quietly
      _ = GaussianMixtureModel(
          features_tensor.size(1),
          mixture_count,
          class_count,
          verbose_build=True,
      )
  
      # Apply GMM
      gmm.learn(features_tensor, labels_tensor)
      results_tensor = gmm.apply(features_tensor)
  
      # Read back results
      results = results_tensor.cpu().numpy()
  
      # Ensure result are as expected
      np.testing.assert_allclose(results, expected, atol=1e-3)
  
file_path: MONAI/tests/test_gmm.py
imports: from __future__ import annotations
  import os
  import shutil
  import tempfile
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai._extensions import load_module
  from monai.networks.layers import GaussianMixtureModel
  from tests.utils import skip_if_darwin, skip_if_no_cuda, skip_if_quick, skip_if_windows
label_desc: Use image node_id 3 for calling the GMMTestCase obj's underlying member method code with example usage: obj.test_cuda(test_case_description, mixture_count, class_count, features, labels, expected) without return types