code: def to_msgs(*messages: Message) -> Dict[str, Tuple[str, str, str]]:
      return reduce(lambda x, y: {**x, **y.to_dict()}, messages, {})
  
imports: from functools import reduce
  from typing import Dict, NamedTuple, Tuple
label_desc: Use image node_id 1 for calling a global function with example usage: to_msgs() and returns: reduce