def METHOD_NAME(subject_uuid: SubjectId, subject_attribute: str, database: Database):
    """Set the subject attribute."""
    new_value = dict(bottle.request.json)[subject_attribute]
    reports = latest_reports(database)
    report = latest_report_for_uuids(reports, subject_uuid)[0]
    subject = report.subjects_dict[subject_uuid]
    old_subject_name = subject.name  # In case the name is the attribute that is changed
    if subject_attribute == "comment" and new_value:
        new_value = sanitize_html(new_value)
    old_value = subject.get(subject_attribute) or ""
    if subject_attribute == "position":
        old_value, new_value = move_item(report, subject, new_value)
    else:
        subject[subject_attribute] = new_value
    if old_value == new_value:
        return {"ok": True}  # Nothing to do
    delta_description = (
        f"{{user}} changed the {subject_attribute} of subject "
        f"'{old_subject_name}' in report '{report.name}' from '{old_value}' to '{new_value}'."
    )
    uuids = [report.uuid, subject.uuid]
    return insert_new_report(database, delta_description, uuids, report)