code: def test_nan_random_extreme_values(self, device, dtype):
      # generate extreme colors randomly
      ext_rand_slice = (
          torch.rand((1, 3, 32, 32), dtype=dtype, device=device) >= 0.5
      ).float()
      assert not kornia.color.rgb_to_hls(ext_rand_slice).isnan().any()
  
imports: import math
  import warnings
  import pytest
  import torch
  from packaging import version
  from torch.autograd import gradcheck
  import kornia
  from kornia.testing import BaseTester
label_desc: Use image node_id 6 for calling the TestRgbToHls obj's underlying member method code with example usage: obj.test_nan_random_extreme_values(device, dtype) without return types