code: def test_masking(self, device, dtype):
      E_mat = torch.rand(2, 3, 3, device=device, dtype=dtype)
      K1 = torch.rand(2, 3, 3, device=device, dtype=dtype)
      K2 = torch.rand(2, 3, 3, device=device, dtype=dtype)
      x1 = torch.rand(2, 10, 2, device=device, dtype=dtype)
      x2 = torch.rand(2, 10, 2, device=device, dtype=dtype)
  
      R, t, X = epi.motion_from_essential_choose_solution(
          E_mat, K1, K2, x1[:, 1:-1, :], x2[:, 1:-1, :]
      )
  
      mask = torch.zeros(2, 10, dtype=torch.bool, device=device)
      mask[:, 1:-1] = True
      Rm, tm, Xm = epi.motion_from_essential_choose_solution(
          E_mat, K1, K2, x1, x2, mask=mask
      )
  
      assert_close(R, Rm)
      assert_close(t, tm)
      assert_close(X, Xm[:, 1:-1, :])
  
imports: import pytest
  import test_common
  import torch
  from torch.autograd import gradcheck
  import kornia
  import kornia.geometry.epipolar
  from kornia.testing import assert_close
label_desc: Use image node_id 3 for calling the TestMotionFromEssentialChooseSolution obj's underlying member method code with example usage: obj.test_masking(device, dtype) without return types