code: def __new__(cls, a, b):
      assert (
          a.device == b.device
          and a.layout == b.layout
          and a.requires_grad == b.requires_grad
          and a.dtype == b.dtype
      )
      # I guess it would be more accurate to represent the shape as torch.cat(a, b).shape
      shape = a.shape
      kwargs = {}
      kwargs["strides"] = a.stride()
      kwargs["storage_offset"] = a.storage_offset()
      kwargs["device"] = a.device
      kwargs["layout"] = a.layout
      kwargs["requires_grad"] = a.requires_grad
      kwargs["dtype"] = a.dtype
      out = torch.Tensor._make_wrapper_subclass(cls, shape, **kwargs)
  
      assert a.shape == b.shape
      assert a.stride() == b.stride()
      assert a.storage_offset() == b.storage_offset()
      return out
  
file_path: pytorch/torch/testing/_internal/two_tensor.py
imports: import torch
  import torch.utils._pytree
  from torch.utils._python_dispatch import return_and_correct_aliasing
label_desc: Use image node_id 1 for calling the TwoTensor obj's underlying member method code with example usage: obj.__new__(cls, a, b) and returns: out