def format_relation(
        relation_type: str, start_id: str, end_id: str, **properties) -> dict:
    """Formats a relation."""
    relation = {
        ':TYPE': relation_type,
        ':START_ID': start_id,
        ':END_ID': end_id,
    }
    relation.update(properties)
    return relation