code: def parse_required_inputs(
      model_out: Dict[str, torch.Tensor],
      required_inputs_list: List[str],
  ) -> Dict[str, torch.Tensor]:
      required_inputs: Dict[str, torch.Tensor] = {}
      for feature in required_inputs_list:
          required_inputs[feature] = model_out[feature].squeeze()
          assert isinstance(required_inputs[feature], torch.Tensor)
      return required_inputs
  
imports: from typing import Dict, List, Optional, Tuple
  import torch
  from torchrec.metrics.rec_metric import RecTaskInfo
label_desc: Use image node_id 3 for calling a global function with example usage: parse_required_inputs(model_out, required_inputs_list) and returns: required_inputs