code: def test_cardinality(self, shape, device, dtype):
      ksize = 5
      angle = 200.0
      direction = 0.3
  
      sample = torch.rand(shape, device=device, dtype=dtype)
      motion = MotionBlur(ksize, angle, direction)
      assert motion(sample).shape == shape
  
imports: import pytest
  import torch
  from kornia.filters import MotionBlur, MotionBlur3D, get_motion_kernel2d, get_motion_kernel3d, motion_blur, motion_blur3d
  from kornia.testing import BaseTester, tensor_to_gradcheck_var
label_desc: Use image node_id 2 for calling the TestMotionBlur obj's underlying member method code with example usage: obj.test_cardinality(shape, device, dtype) without return types