code: def test_random_crops(self, device, dtype):
      torch.manual_seed(233)
      input = torch.randn(3, 3, 3, 3, device=device, dtype=dtype)
      bbox = torch.tensor(
          [
              [
                  [1.0, 1.0, 2.0, 2.0],
                  [0.0, 0.0, 1.0, 2.0],
                  [0.0, 0.0, 2.0, 1.0],
              ]
          ],
          device=device,
          dtype=dtype,
      ).expand(3, -1, -1)
      points = torch.tensor(
          [[[0.0, 0.0], [1.0, 1.0]]], device=device, dtype=dtype
      ).expand(3, -1, -1)
      aug = K.AugmentationSequential(
          K.RandomCrop(
              (3, 3), padding=1, cropping_mode="resample", fill=0
          ),
          K.RandomAffine((360.0, 360.0), p=1.0),
          data_keys=["input", "mask", "bbox_xyxy", "keypoints"],
          extra_args={},
      )
  
      reproducibility_test((input, input, bbox, points), aug)
  
      _params = aug.forward_parameters(input.shape)
      # specifying the crops allows us to compute by hand the expected outputs
      _params[0].data["src"] = torch.tensor(
          [
              [[1.0, 2.0], [3.0, 2.0], [3.0, 4.0], [1.0, 4.0]],
              [[1.0, 1.0], [3.0, 1.0], [3.0, 3.0], [1.0, 3.0]],
              [[2.0, 0.0], [4.0, 0.0], [4.0, 2.0], [2.0, 2.0]],
          ],
          device=_params[0].data["src"].device,
          dtype=_params[0].data["src"].dtype,
      )
  
      expected_out_bbox = torch.tensor(
          [
              [
                  [1.0, 0.0, 2.0, 1.0],
                  [0.0, -1.0, 1.0, 1.0],
                  [0.0, -1.0, 2.0, 0.0],
              ],
              [
                  [1.0, 1.0, 2.0, 2.0],
                  [0.0, 0.0, 1.0, 2.0],
                  [0.0, 0.0, 2.0, 1.0],
              ],
              [
                  [0.0, 2.0, 1.0, 3.0],
                  [-1.0, 1.0, 0.0, 3.0],
                  [-1.0, 1.0, 1.0, 2.0],
              ],
          ],
          device=device,
          dtype=dtype,
      )
      expected_out_points = torch.tensor(
          [
              [[0.0, -1.0], [1.0, 0.0]],
              [[0.0, 0.0], [1.0, 1.0]],
              [[-1.0, 1.0], [0.0, 2.0]],
          ],
          device=device,
          dtype=dtype,
      )
  
      out = aug(input, input, bbox, points, params=_params)
      assert out[0].shape == (3, 3, 3, 3)
      assert_close(out[0], out[1], atol=1e-4, rtol=1e-4)
      assert out[2].shape == bbox.shape
      assert_close(out[2], expected_out_bbox, atol=1e-4, rtol=1e-4)
      assert out[3].shape == points.shape
      assert_close(out[3], expected_out_points, atol=1e-4, rtol=1e-4)
  
      out_inv = aug.inverse(*out)
      assert out_inv[0].shape == input.shape
      assert_close(out_inv[0], out_inv[1], atol=1e-4, rtol=1e-4)
      assert out_inv[2].shape == bbox.shape
      assert_close(out_inv[2], bbox, atol=1e-4, rtol=1e-4)
      assert out_inv[3].shape == points.shape
      assert_close(out_inv[3], points, atol=1e-4, rtol=1e-4)
  
imports: from functools import partial
  from unittest.mock import patch
  import pytest
  import torch
  import kornia
  import kornia.augmentation
  from kornia.augmentation.container.base import ParamItem
  from kornia.constants import BorderType
  from kornia.geometry.bbox import bbox_to_mask
  from kornia.testing import assert_close
label_desc: Use image node_id 10 for calling the TestAugmentationSequential obj's underlying member method code with example usage: obj.test_random_crops(device, dtype) without return types