def METHOD_NAME(contest: Contest, root: ET.Element, last_medals: List[int]):
    finalized = ET.SubElement(root, 'finalized')
    finalized.tail = '\n'
    ET.SubElement(finalized, 'last-gold').text = str(last_medals[0])
    ET.SubElement(finalized, 'last-silver').text = str(last_medals[1])
    ET.SubElement(finalized, 'last-bronze').text = str(last_medals[2])
    ET.SubElement(finalized, 'comment').text = 'Auto-finalized'
    ET.SubElement(finalized, 'timestamp').text = str(timezone.now().timestamp())