code: def test_cardinality(self, shape, device, dtype):
      cm = AUTUMN(device=device, dtype=dtype)
      input_tensor = torch.randint(
          0, 63, shape, device=device, dtype=dtype
      )
      actual = apply_colormap(input_tensor, cm)
  
      if len(shape) == 4:
          expected_shape = (shape[0], 3, shape[-2], shape[-1])
      else:
          expected_shape = (3, shape[-2], shape[-1])
  
      assert actual.shape == expected_shape
  
file_path: kornia/test/color/test_colormap.py
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  from kornia.color import AUTUMN, ApplyColorMap, apply_colormap
  from kornia.core import tensor
  from kornia.testing import BaseTester, assert_close, tensor_to_gradcheck_var
label_desc: Use image node_id 4 for calling the TestApplyColorMap obj's underlying member method code with example usage: obj.test_cardinality(shape, device, dtype) without return types