code: def construct_output_from_dict(struct_dict: Dict):
      keys = sorted(list(struct_dict.keys()))
      if keys == ["logits", "other"]:
          return LogitsOutput.from_dict(struct_dict)
      elif keys == ["logits", "loss", "other"]:
          return LogitsAndLossOutput.from_dict(struct_dict)
      elif keys == ["embedding", "other"]:
          return EmbeddingOutput.from_dict(struct_dict)
      else:
          raise ValueError()
  
file_path: jiant/jiant/proj/main/components/outputs.py
imports: from dataclasses import dataclass
  from typing import Any, Dict
  import torch
  from jiant.utils.python.datastructures import ExtendedDataClassMixin
label_desc: Use image node_id 1 for calling a global function with example usage: construct_output_from_dict(struct_dict) and returns: LogitsOutput, LogitsAndLossOutput, EmbeddingOutput