docstr: Tests that an exception is raised if p2 is out of bounds.
docstr_tok: ["Tests","that","an","exception","is","raised","if","p2","is","out","of","bounds","."]
code: def test_p2_out_of_bounds(self, p2, dtype, device):
      """Tests that an exception is raised if p2 is out of bounds."""
      img = torch.zeros(1, 8, 8, dtype=dtype, device=device)
      with pytest.raises(ValueError) as excinfo:
          draw_line(img, torch.tensor([0, 0]), p2, torch.tensor([255]))
  
      assert "p2 is out of bounds." == 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 10 for calling the TestDrawLine obj's underlying member method code with example usage: obj.test_p2_out_of_bounds(p2, dtype, device) without return types