code: def test_affine_rotate_translate(self, device, dtype):
      # TODO: Remove when #666 is implemented
      if device.type == "cuda":
          pytest.skip(
              "Currently breaks in CUDA."
              "See https://github.com/kornia/kornia/issues/666"
          )
      batch_size = 2
  
      input = torch.tensor(
          [
              [
                  [0.0, 0.0, 0.0, 1.0],
                  [0.0, 0.0, 1.0, 0.0],
                  [0.0, 0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0, 0.0],
              ]
          ],
          device=device,
          dtype=dtype,
      ).repeat(batch_size, 1, 1, 1)
  
      angle = torch.tensor(180.0, device=device, dtype=dtype).repeat(
          batch_size
      )
      translation = torch.tensor(
          [1.0, 0.0], device=device, dtype=dtype
      ).repeat(batch_size, 1)
  
      expected = torch.tensor(
          [
              [
                  [0.0, 0.0, 0.0, 0.0],
                  [0.0, 0.0, 0.0, 0.0],
                  [0.0, 0.0, 1.0, 0.0],
                  [0.0, 1.0, 0.0, 0.0],
              ]
          ],
          device=device,
          dtype=dtype,
      ).repeat(batch_size, 1, 1, 1)
  
      transform = kornia.geometry.transform.Affine(
          angle=angle, translation=translation, align_corners=True
      ).to(device=device, dtype=dtype)
      actual = transform(input)
      assert_close(actual, expected, atol=1e-4, rtol=1e-4)
  
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  import kornia.testing
  from kornia.testing import assert_close
label_desc: Use image node_id 7 for calling the TestAffine2d obj's underlying member method code with example usage: obj.test_affine_rotate_translate(device, dtype) without return types