docstr: Test the nested tensor works
docstr_tok: ["Test","the","nested","tensor","works"]
code: def test_run(self) -> None:
      """
      Test the nested tensor works
      """
      tensor1 = torch.randn(1, 3, 7, 7)
      tensor2 = torch.randn(1, 3, 4, 4)
      out = MultiDimensionalTensor.from_tensors([tensor1, tensor2])
      padded_tensor, out_mask = out.tensor, out.mask
  
      # check the output shapes are good
      self.assertEqual(
          padded_tensor.shape, (2, 3, 7, 7), padded_tensor.shape
      )
      self.assertEqual(out_mask.shape, (2, 7, 7), out_mask.shape)
  
      # check that the output mask is as expected. The padded
      # indexes should have 1.0 value in the mask
      self.assertTrue(
          out_mask.float().equal(
              torch.tensor(
                  [
                      [
                          [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                          [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                          [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                          [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                          [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                          [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                          [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                      ],
                      [
                          [0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0],
                          [0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0],
                          [0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0],
                          [0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0],
                          [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                          [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                          [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                      ],
                  ]
              )
          )
      )
  
imports: import logging
  import unittest
  import torch
  from vissl.data.collators.collator_helper import MultiDimensionalTensor
label_desc: Use image node_id 1 for calling the TestMultiDimensionalTensor obj's underlying member method code with example usage: obj.test_run() without return types