code: def _maskfeat_forward(self, x, mask, return_all=False):
      x_embed, x_shape = self.patch_embed(x)
      if self.cfg.MASK.MAE_RND_MASK:
          _, mask, ids_restore, ids_keep = self._mae_random_masking(
              x_embed, self.cfg.AUG.MASK_RATIO, None
          )
          output_masks = [mask.to(torch.bool)]
      else:
          # take masks and labels from loader
          float_mask = mask.type_as(x)
          output_masks = self._get_multiscale_mask(float_mask)
      labels = []
      if self.pred_pixel_wt:
          if self.use_2d_patch:
              labels += self._get_pixel_label_2d(
                  x.detach(),
                  output_masks,
                  norm=self.cfg.MASK.NORM_PRED_PIXEL,
              )
          else:
              labels += self._get_pixel_label_3d(
                  x.detach(),
                  output_masks,
                  norm=self.cfg.MASK.NORM_PRED_PIXEL,
              )
      if self.pred_hog_wt:
          if self.use_2d_patch:
              labels += self._get_hog_label_2d(x.detach(), output_masks)
          else:
              labels += self._get_hog_label_3d(x.detach(), output_masks)
  
      x = x_embed
      T, H, W = self.T, self.H, self.W
      B, N, C = x.shape
  
      # switch input tokens by mask_token
      mask_tokens = self.mask_token.expand(B, N, -1)
      if self.cfg.MASK.MAE_RND_MASK:
          float_mask = mask.unsqueeze(-1)
      else:
          if self.use_2d_patch:
              float_mask = F.interpolate(
                  float_mask.unsqueeze(0), size=(H, W)
              )[0]
          else:
              float_mask = F.interpolate(float_mask, size=(H, W))
          float_mask = float_mask.flatten(1).unsqueeze(-1)
      x = x * (1 - float_mask) + mask_tokens * float_mask
  
      if self.cls_embed_on:
          cls_tokens = self.cls_token.expand(B, -1, -1)
          x = torch.cat((cls_tokens, x), dim=1)
  
      if self.use_abs_pos:
          if self.sep_pos_embed:
              pos_embed = self.pos_embed_spatial.repeat(
                  1, self.patch_dims[0], 1
              ) + torch.repeat_interleave(
                  self.pos_embed_temporal,
                  self.patch_dims[1] * self.patch_dims[2],
                  dim=1,
              )
              if self.cls_embed_on:
                  pos_embed = torch.cat(
                      [self.pos_embed_class, pos_embed], 1
                  )
              x = x + pos_embed
          else:
              x = x + self.pos_embed
  
      if self.drop_rate:
          x = self.pos_drop(x)
  
      if self.norm_stem:
          x = self.norm_stem(x)
  
      thw = [T, H, W]
      block_outputs = []
      for idx, blk in enumerate(self.blocks):
          x, thw = blk(x, thw)
          if idx in self.pretrain_depth:
              block_outputs.append(x)
  
      model_outputs = []
      if self.pred_pixel_wt:
          pixel_outputs = self.pred_head(
              block_outputs,
              output_masks,
              return_all=return_all,
              thw=thw,
          )
          model_outputs += pixel_outputs
      if self.pred_hog_wt:
          hog_outputs = self.pred_head(
              block_outputs,
              output_masks,
              return_all=return_all,
              thw=thw,
          )
          model_outputs += hog_outputs
  
      return model_outputs, labels
  
imports: import math
  from functools import partial
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.nn.init import trunc_normal_
  import slowfast.utils.logging
  import slowfast.utils.misc
  from slowfast.models import head_helper
  from slowfast.models.attention import attention_pool
  from slowfast.models.utils import calc_mvit_feature_geometry
  from slowfast.models.video_model_builder import MViT
  from .None import head_helper, operators, resnet_helper, stem_helper
  from .build import MODEL_REGISTRY
label_desc: Use image node_id 16 for calling the MaskMViT obj's underlying member method code with example usage: obj._maskfeat_forward(x, mask, return_all) and returns: model_outputs,  labels