code: def test_color_image_channel_size(
      self, img_size, color, dtype, device
  ):
      img = torch.zeros(*img_size, dtype=dtype, device=device)
      with pytest.raises(ValueError) as excinfo:
          draw_line(
              img, torch.tensor([0, 0]), torch.tensor([1, 1]), color
          )
  
      assert (
          "color must have the same number of channels as the image."
          == str(excinfo.value)
      )
  
imports: import math
  import pytest
  import torch
  from kornia.testing import assert_close
  from kornia.utils import create_meshgrid, draw_convex_polygon, draw_rectangle
  from kornia.utils.draw import draw_line, draw_point2d
label_desc: Use image node_id 12 for calling the TestDrawLine obj's underlying member method code with example usage: obj.test_color_image_channel_size(img_size, color, dtype, device) without return types