class_docstr: Pair for :class:`torch.Tensor`-like inputs.
  
  Kwargs:
      allow_subclasses (bool):
      rtol (Optional[float]): Relative tolerance. If specified ``atol`` must also be specified. If omitted, default
          values based on the type are selected. See :func:assert_close: for details.
      atol (Optional[float]): Absolute tolerance. If specified ``rtol`` must also be specified. If omitted, default
          values based on the type are selected. See :func:assert_close: for details.
      equal_nan (bool): If ``True``, two ``NaN`` values are considered equal. Defaults to ``False``.
      check_device (bool): If ``True`` (default), asserts that corresponding tensors are on the same
          :attr:`~torch.Tensor.device`. If this check is disabled, tensors on different
          :attr:`~torch.Tensor.device`'s are moved to the CPU before being compared.
      check_dtype (bool): If ``True`` (default), asserts that corresponding tensors have the same ``dtype``. If this
          check is disabled, tensors with different ``dtype``'s are promoted  to a common ``dtype`` (according to
          :func:`torch.promote_types`) before being compared.
      check_layout (bool): If ``True`` (default), asserts that corresponding tensors have the same ``layout``. If this
          check is disabled, tensors with different ``layout``'s are converted to strided tensors before being
          compared.
      check_stride (bool): If ``True`` and corresponding tensors are strided, asserts that they have the same stride.
class_docstr_tok: ["Pair","for",":","class",":","`","torch.Tensor","`","-like","inputs",".","Kwargs",":","allow_subclasses","(","bool",")",":","rtol","(","Optional","[","float","]",")",":","Relative","tolerance",".","If","specified","``","atol","``","must","also","be","specified",".","If","omitted",",","default","values","based","on","the","type","are","selected",".","See",":","func",":","assert_close",":","for","details",".","atol","(","Optional","[","float","]",")",":","Absolute","tolerance",".","If","specified","``","rtol","``","must","also","be","specified",".","If","omitted",",","default","values","based","on","the","type","are","selected",".","See",":","func",":","assert_close",":","for","details",".","equal_nan","(","bool",")",":","If","``","True","``",",","two","``","NaN","``","values","are","considered","equal",".","Defaults","to","``","False","``",".","check_device","(","bool",")",":","If","``","True","``","(","default",")",",","asserts","that","corresponding","tensors","are","on","the","same",":","attr",":","`","~torch.Tensor.device","`",".","If","this","check","is","disabled",",","tensors","on","different",":","attr",":","`","~torch.Tensor.device","`","'s","are","moved","to","the","CPU","before","being","compared",".","check_dtype","(","bool",")",":","If","``","True","``","(","default",")",",","asserts","that","corresponding","tensors","have","the","same","``","dtype","``",".","If","this","check","is","disabled",",","tensors","with","different","``","dtype","``","'s","are","promoted","to","a","common","``","dtype","``","(","according","to",":","func",":","`","torch.promote_types","`",")","before","being","compared",".","check_layout","(","bool",")",":","If","``","True","``","(","default",")",",","asserts","that","corresponding","tensors","have","the","same","``","layout","``",".","If","this","check","is","disabled",",","tensors","with","different","``","layout","``","'s","are","converted","to","strided","tensors","before","being","compared",".","check_stride","(","bool",")",":","If","``","True","``","and","corresponding","tensors","are","strided",",","asserts","that","they","have","the","same","stride","."]
code: def _process_inputs(
      self,
      actual: Any,
      expected: Any,
      *,
      id: Tuple[Any, ...],
      allow_subclasses: bool,
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      directly_related = isinstance(
          actual, type(expected)
      ) or isinstance(expected, type(actual))
      if not directly_related:
          self._inputs_not_supported()
  
      if not allow_subclasses and type(actual) is not type(expected):
          self._inputs_not_supported()
  
      actual, expected = (
          self._to_tensor(input) for input in (actual, expected)
      )
      for tensor in (actual, expected):
          self._check_supported(tensor, id=id)
      return actual, expected
  
imports: import abc
  import cmath
  import collections.abc
  import contextlib
  import warnings
  from typing import Any, Callable, Collection, Dict, List, NoReturn, Optional, Sequence, Tuple, Type, Union
  import torch
label_desc: Use image node_id 2 for calling the TensorLikePair obj's underlying member method code with example usage: obj._process_inputs(actual, expected) and returns: actual,  expected