code: def test_param(
      self,
      angle,
      direction,
      border_type,
      resample,
      same_on_batch,
      device,
      dtype,
  ):
      _angle = (
          angle
          if isinstance(angle, (float, int, list, tuple))
          else nn.Parameter(
              angle.clone().to(device=device, dtype=dtype)
          )
      )
      _direction = (
          direction
          if isinstance(direction, (list, tuple))
          else nn.Parameter(
              direction.clone().to(device=device, dtype=dtype)
          )
      )
  
      torch.manual_seed(0)
      input = (
          torch.randint(
              255, (2, 3, 10, 10, 10), device=device, dtype=dtype
          )
          / 255.0
      )
      aug = RandomMotionBlur3D(
          (3, 3),
          _angle,
          _direction,
          border_type,
          resample,
          same_on_batch,
          p=1.0,
      )
  
      output = aug(input)
  
      if len(list(aug.parameters())) != 0:
          mse = nn.MSELoss()
          opt = torch.optim.SGD(aug.parameters(), lr=10)
          loss = mse(
              output, torch.ones_like(output) * 2
          )  # to ensure that a big loss value could be obtained
          loss.backward()
          opt.step()
  
      if not isinstance(angle, (float, int, list, tuple)):
          assert isinstance(aug._param_generator.angle, torch.Tensor)
          if (
              resample == "nearest"
              and aug._param_generator.angle.is_cuda
          ):
              # grid_sample in nearest mode and cuda device returns nan than 0
              pass
          elif resample == "nearest" or torch.all(
              aug._param_generator.angle._grad == 0.0
          ):
              # grid_sample will return grad = 0 for resample nearest
              # https://discuss.pytorch.org/t/autograd-issue-with-f-grid-sample/76894
              assert (
                  angle.to(device=device, dtype=dtype)
                  - aug._param_generator.angle.data
              ).sum() == 0
          else:
              # Assert if param not updated
              assert (
                  angle.to(device=device, dtype=dtype)
                  - aug._param_generator.angle.data
              ).sum() != 0
      if not isinstance(direction, (list, tuple)):
          assert isinstance(
              aug._param_generator.direction, torch.Tensor
          )
          if torch.all(aug._param_generator.direction._grad == 0.0):
              # grid_sample will return grad = 0 for resample nearest
              # https://discuss.pytorch.org/t/autograd-issue-with-f-grid-sample/76894
              assert (
                  direction.to(device=device, dtype=dtype)
                  - aug._param_generator.direction.data
              ).sum() == 0
          else:
              # Assert if param not updated
              assert (
                  direction.to(device=device, dtype=dtype)
                  - aug._param_generator.direction.data
              ).sum() != 0
  
file_path: kornia/test/augmentation/test_backward_3d.py
imports: import pytest
  import torch
  from torch import nn
  from kornia.augmentation import RandomAffine3D, RandomMotionBlur3D, RandomPerspective3D, RandomRotation3D
label_desc: Use image node_id 1 for calling the TestRandomMotionBlur3DBackward obj's underlying member method code with example usage: obj.test_param(angle, direction, border_type, resample, same_on_batch, device, dtype) without return types