code: def test_out_of_bounds_rectangle(self, device, dtype):
      b, c, h, w = 1, 3, 500, 500
      im = torch.zeros(b, c, h, w, device=device, dtype=dtype)
      color = torch.tensor([1, 1, 1], device=device, dtype=dtype)[
          None
      ].expand(b, c)
      pts = 350 + torch.tensor(
          [[[50, 50], [200, 50], [200, 250], [50, 250]]],
          device=device,
          dtype=dtype,
      )
      poly_im = draw_convex_polygon(im.clone(), pts, color)
      rect = torch.cat((pts[..., 0, :], pts[..., 2, :]), dim=-1)[
          :, None
      ]
      rect_im = draw_rectangle(
          im.clone(), rect, color[:, None], fill=True
      )
      assert_close(rect_im, poly_im)
      pts = -150 + torch.tensor(
          [[[50, 50], [200, 50], [200, 250], [50, 250]]],
          device=device,
          dtype=dtype,
      )
      poly_im = draw_convex_polygon(im.clone(), pts, color)
      rect = torch.cat((pts[..., 0, :], pts[..., 2, :]), dim=-1)[
          :, None
      ]
      rect_im = draw_rectangle(
          im.clone(), rect, color[:, None], fill=True
      )
      assert_close(rect_im, poly_im)
  
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 7 for calling the TestFillConvexPolygon obj's underlying member method code with example usage: obj.test_out_of_bounds_rectangle(device, dtype) without return types