def order_metadata(metadata: list) -> list:
    """Orders 2-element metadata according to measurementDate."""
    key = "measurementDate"
    if len(metadata) == 2 and metadata[0][key] > metadata[1][key]:
        metadata.reverse()
    return metadata