code: def _test_forward(self, device, batch_size=8, seed=0):
      torch.manual_seed(seed)
      vit = self._vit()
      backbone = MAEBackbone.from_vit(vit).to(device)
      images = torch.rand(
          batch_size, 3, vit.image_size, vit.image_size
      ).to(device)
      _idx_keep, _ = utils.random_token_mask(
          size=(batch_size, vit.seq_length),
          device=device,
      )
      for idx_keep in [None, _idx_keep]:
          with self.subTest(idx_keep=idx_keep):
              class_tokens = backbone(images, idx_keep)
  
              # output shape must be correct
              expected_shape = [batch_size, vit.hidden_dim]
              self.assertListEqual(
                  list(class_tokens.shape), expected_shape
              )
  
              # output must have reasonable numbers
              self.assertTrue(
                  torch.all(torch.not_equal(class_tokens, torch.inf))
              )
  
imports: import unittest
  import torch
  import torchvision
  from lightly import _torchvision_vit_available
  from lightly.models import utils
label_desc: Use image node_id 3 for calling the TestMAEBackbone obj's underlying member method code with example usage: obj._test_forward(device, batch_size, seed) without return types