code: def assertEqualMasked(self, actual, expected, mask):
      strided = to_strided(actual)
      if mask is not None:
          strided = torch.where(mask, strided, strided.new_zeros([]))
          expected = torch.where(mask, expected, expected.new_zeros([]))
      self.assertEqual(strided, expected, exact_device=False)
  
imports: import itertools
  import torch
  from typing import List, Any
  from functools import wraps
  import unittest
  from torch.testing._internal.common_utils import skipIfTorchDynamo
  from torch.testing._internal.common_utils import TestCase, parametrize, suppress_warnings, _TestParametrizer, run_tests
  from torch.testing._internal.common_methods_invocations import op_db, SampleInput
  from torch.testing._internal.common_device_type import instantiate_device_type_tests, ops, onlyNativeDeviceTypes, precisionOverride
label_desc: Use image node_id 1 for calling the TestMasked obj's underlying member method code with example usage: obj.assertEqualMasked(actual, expected, mask) without return types