code: def _infer_mlm_labels(
      self, sample_list: Dict[str, Tensor], input_ids: Dict[str, Tensor]
  ) -> Dict[str, Tensor]:
      # MLM Labels
      mlm_labels: Dict[str, Tensor] = {}
      current_text_idx = 0
      for idx, modality in enumerate(self.modality_keys):
          if (
              self.modality_type[idx] == "text"
              and "lm_label_ids" in sample_list
          ):
              if sample_list["lm_label_ids"].dim() > 2:
                  mlm_labels[modality] = sample_list["lm_label_ids"][
                      :, current_text_idx
                  ]
                  current_text_idx += 1
              else:
                  mlm_labels[modality] = sample_list["lm_label_ids"]
          else:
              mlm_labels[modality] = torch.full(
                  input_ids[modality].size()[:2],
                  fill_value=-1,
                  dtype=torch.long,
                  device=input_ids[modality].device,
              )
  
      mlm_labels_list = []
      for modality in self.modality_keys:
          mlm_labels_list.append(mlm_labels[modality])
  
      if mlm_labels_list:
          mlm_labels["combined_labels"] = torch.cat(
              mlm_labels_list, dim=-1
          )
  
      return mlm_labels
  
imports: import logging
  from dataclasses import dataclass, field
  from typing import Dict, List, Optional
  import torch
  from mmf.common.registry import registry
  from mmf.models.transformers.base import BaseTransformer, BaseTransformerBackendConfig, BaseTransformerHead, BaseTransformerModalityConfig
  from mmf.models.transformers.heads.mlp import MLP
  from mmf.modules.encoders import ResNet152ImageEncoder
  from mmf.utils.build import build_encoder
  from omegaconf import MISSING, OmegaConf
  from torch import nn, Tensor
label_desc: Use image node_id 13 for calling the MMFTransformer obj's underlying member method code with example usage: obj._infer_mlm_labels(sample_list, input_ids) and returns: mlm_labels