---
type: "Source File"
title: "!/usr/bin/env python3"
description: "#!/usr/bin/env python3 \"\"\"Merge repeated UK story observations into one score-bearing event. Dry-run is the default. ``--apply`` takes an SQLite snapshot backup, holds an immediate write transaction, records every."
resource: "https://uk.copecheck.com"
tags: ["copecheck", "uk", "source-file", "py"]
timestamp: "2026-08-24T12:57:08Z"
site: "uk"
source_path: "copecheck-uk/migrate_cope_events.py"
---

# !/usr/bin/env python3

Source path: `copecheck-uk/migrate_cope_events.py`  
Index snapshot generated: `2026-11-24T13:42:54Z`  
File modified: `2026-08-24T12:57:08Z`

```py
#!/usr/bin/env python3
"""Merge repeated UK story observations into one score-bearing event.

Dry-run is the default.  ``--apply`` takes an SQLite snapshot backup, holds an
immediate write transaction, records every legacy observation as provenance,
merges conservative per-figure event clusters, enables a unique invariant,
and recomputes all cached figure aggregates from unique public events.
"""
from __future__ import annotations

import argparse
import fcntl
import hashlib
import json
import os
import sqlite3
from collections import defaultdict
from contextlib import contextmanager
from datetime import datetime, timezone
from pathlib import Path
from urllib.parse import quote as uri_quote, urlsplit

import db_uk as score_db
from canonical_identity import (
    canonical_url,
    canonical_url_hash,
    exact_statement_match,
    new_event_fingerprint,
    normalise_text,
    provenance_key,
    same_event,
)


EVENT_WINDOW_DAYS = 7.0


def _utc(value=None):
    now = datetime.now(timezone.utc)
    try:
        parsed = datetime.fromisoformat(str(value or "").replace("Z", "+00:00"))
    except (TypeError, ValueError):
        return now
    if parsed.tzinfo is None:
        parsed = parsed.replace(tzinfo=timezone.utc)
    return min(parsed.astimezone(timezone.utc), now)


def _public(row):
    return str(row.get("cope_type") or "").strip().lower() not in {
        "unknown", "n/a", "none", "other", "irrelevant", "",
    }


def representative_quality(row):
    canonical = row.get("_canonical") or canonical_url(row.get("source_url"))
    host = (urlsplit(canonical).hostname or "").lower() if canonical else ""
    quality = 80 if canonical else 0
    if host == "news.google.com":
        quality -= 60
    elif any(host == name or host.endswith("." + name) for name in (
        "aol.com", "aol.co.uk", "yahoo.com", "yahoo.co.uk",
    )):
        quality -= 20
    if str(row.get("source_title") or "").strip():
        quality += 10
    quality += min(len(normalise_text(row.get("quote"))), 500) // 25
    return max(0, quality)


def _columns(conn, table):
    return {row["name"] for row in conn.execute(f"PRAGMA table_info({table})")}


def _ensure_column(conn, table, name, definition):
    if name not in _columns(conn, table):
        conn.execute(f"ALTER TABLE {table} ADD COLUMN {name} {definition}")


def ensure_schema(conn):
    _ensure_column(conn, "cope_entries", "canonical_url", "TEXT")
    _ensure_column(conn, "cope_entries", "canonical_url_hash", "TEXT")
    _ensure_column(conn, "cope_entries", "event_fingerprint", "TEXT")
    _ensure_column(conn, "cope_entries", "event_observed_at", "TEXT")
    _ensure_column(
        conn, "cope_entries", "representative_quality",
        "INTEGER NOT NULL DEFAULT 0",
    )
    conn.execute(
        """
        CREATE TABLE IF NOT EXISTS cope_entry_provenance (
            id INTEGER PRIMARY KEY AUTOINCREMENT,
            cope_entry_id INTEGER NOT NULL
                REFERENCES cope_entries(id) ON DELETE CASCADE,
            observation_key TEXT NOT NULL,
            source_url TEXT,
            canonical_url TEXT,
            source_title TEXT,
            quote TEXT,
            channel TEXT,
            observed_at TEXT,
            observed_cope_score REAL,
            observed_cope_type TEXT,
            observed_analysis_md TEXT,
            observed_model TEXT,
            representative_quality INTEGER,
            legacy_cope_entry_id INTEGER,
            created_at TEXT DEFAULT CURRENT_TIMESTAMP,
            UNIQUE(cope_entry_id, observation_key)
        )
        """
    )
    conn.execute(
        "CREATE INDEX IF NOT EXISTS idx_cope_provenance_entry "
        "ON cope_entry_provenance(cope_entry_id, created_at)"
    )
    conn.execute(
        "CREATE INDEX IF NOT EXISTS idx_cope_canonical "
        "ON cope_entries(figure_id, canonical_url_hash)"
    )


def _event_rows(conn):
    rows = []
    for raw in conn.execute("SELECT * FROM cope_entries ORDER BY created_at, id"):
        row = dict(raw)
        row["_canonical"] = (
            row.get("canonical_url") or canonical_url(row.get("source_url"))
        )
        row["_observed"] = _utc(
            row.get("event_observed_at") or row.get("created_at")
        ).isoformat()
        row["_quality"] = representative_quality(row)
        rows.append(row)
    return rows


def event_clusters(conn):
    by_figure = defaultdict(list)
    for row in _event_rows(conn):
        by_figure[row["figure_id"]].append(row)

    clusters = []
    for rows in by_figure.values():
        rows.sort(key=lambda row: (row["_observed"], row["id"]))
        parents = list(range(len(rows)))

        def find(index):
            while parents[index] != index:
                parents[index] = parents[parents[index]]
                index = parents[index]
            return index

        def union(left, right):
            left_root, right_root = find(left), find(right)
            if left_root != right_root:
                parents[right_root] = left_root

        for left_index, left in enumerate(rows):
            left_at = _utc(left["_observed"])
            for right_index in range(left_index + 1, len(rows)):
                right = rows[right_index]
                exact_url = bool(
                    left["_canonical"]
                    and left["_canonical"] == right["_canonical"]
                )
                timeless = exact_statement_match(
                    "", left.get("quote") or "",
                    "", right.get("quote") or "",
                )
                within_window = abs(
                    (left_at - _utc(right["_observed"])).total_seconds()
                ) <= EVENT_WINDOW_DAYS * 86400
                statement_match = same_event(
                    canonical_a="",
                    title_a="",
                    quote_a=left.get("quote") or "",
                    canonical_b="",
                    title_b="",
                    quote_b=right.get("quote") or "",
                )
                if timeless or (statement_match and (exact_url or within_window)):
                    union(left_index, right_index)

        components = defaultdict(list)
        for index, row in enumerate(rows):
            components[find(index)].append(row)
        clusters.extend(components.values())
    return clusters


def _winner(cluster):
    return sorted(
        cluster,
        key=lambda row: (
            -row["_quality"], row["_canonical"],
            row.get("source_title") or "", row.get("quote") or "",
            row.get("model") or "", row["id"],
        ),
    )[0]


def _score(rows, figure):
    public = [row for row in rows if _public(row)]
    return score_db._public_cope_index(
        public,
        figure.get("role") or "",
        figure.get("type") or "",
        figure.get("category") or "",
    ) if public else 0.0


def _frequency(rows, now=None):
    now = now or datetime.now(timezone.utc)
    public = [row for row in rows if _public(row)]
    high = sum(
        1 for row in public
        if float(row.get("cope_score") or 0) >= 60
        and score_db._entry_age_days(row, now) <= 60
    )
    terminal = sum(
        1 for row in public
        if float(row.get("cope_score") or 0) >= 80
        and score_db._entry_age_days(row, now) <= 60
    )
    lucid = sum(
        1 for row in public
        if float(row.get("cope_score") or 0) <= 19
        and score_db._entry_age_days(row, now) <= 30
    )
    return {
        "high_recent": high,
        "terminal_recent": terminal,
        "lucid_recent": lucid,
        "frequency_lift": round(min(10.0, high + terminal * 1.5), 1),
        "lucid_offset": round(min(6.0, lucid * 0.8), 1),
    }


def plan(conn):
    clusters = event_clusters(conn)
    duplicate_groups = [group for group in clusters if len(group) > 1]
    figures = {
        row["id"]: dict(row)
        for row in conn.execute("SELECT id, role, type, category FROM figures")
    }
    before_by_figure = defaultdict(list)
    after_by_figure = defaultdict(list)
    for cluster in clusters:
        before_by_figure[cluster[0]["figure_id"]].extend(cluster)
        representative = dict(_winner(cluster))
        representative["event_observed_at"] = min(
            row["_observed"] for row in cluster
        )
        after_by_figure[cluster[0]["figure_id"]].append(representative)
    formula_changes = []
    now = datetime.now(timezone.utc)
    for figure_id in sorted(before_by_figure):
        figure = figures.get(figure_id, {})
        before_rows = before_by_figure[figure_id]
        after_rows = after_by_figure[figure_id]
        before_score = _score(before_rows, figure)
        after_score = _score(after_rows, figure)
        before_frequency = _frequency(before_rows, now)
        after_frequency = _frequency(after_rows, now)
        if len(before_rows) != len(after_rows) or before_score != after_score:
            formula_changes.append({
                "figure_id": figure_id,
                "events_before": len(before_rows),
                "events_after": len(after_rows),
                "score_before": before_score,
                "score_after": after_score,
                "frequency_before": before_frequency,
                "frequency_after": after_frequency,
            })
    total = sum(len(group) for group in clusters)
    return {
        "cope_entries_before": total,
        "canonical_events": len(clusters),
        "event_duplicate_groups": len(duplicate_groups),
        "cope_entries_to_merge": sum(len(group) - 1 for group in duplicate_groups),
        "affected_figures": sorted({group[0]["figure_id"] for group in duplicate_groups}),
        "formula_changes": formula_changes,
    }


def _legacy_channel(row):
    url = str(row.get("source_url") or "").lower()
    if "news.google.com" in url:
        return "google_news"
    title = str(row.get("source_title") or "").strip()
    return title or "legacy"


def _insert_legacy_provenance(conn, entry_id, row):
    channel = _legacy_channel(row)
    observation = provenance_key(
        row["_canonical"],
        f"legacy-cope-{row['id']}\n{row.get('source_title') or ''}\nchannel:{channel}",
        row.get("quote") or "",
    )
    conn.execute(
        """INSERT OR IGNORE INTO cope_entry_provenance
           (cope_entry_id, observation_key, source_url, canonical_url,
            source_title, quote, channel, observed_at, created_at,
            observed_cope_score, observed_cope_type, observed_analysis_md,
            observed_model, representative_quality, legacy_cope_entry_id)
           VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
        (entry_id, observation, row.get("source_url"), row["_canonical"],
         row.get("source_title"), row.get("quote"), channel,
         row["_observed"], row.get("created_at"), row.get("cope_score"),
         row.get("cope_type"), row.get("analysis_md"), row.get("model"),
         row["_quality"], row["id"]),
    )


def apply_event_merge(conn):
    merged = 0
    assigned = set()
    for cluster in event_clusters(conn):
        winner = _winner(cluster)
        event_id = winner["id"]
        observed = min(row["_observed"] for row in cluster)
        base_fingerprint = new_event_fingerprint(
            winner["figure_id"], winner.get("source_title"),
            winner.get("quote"), observed,
        )
        fingerprint = winner.get("event_fingerprint") or base_fingerprint
        collision_counter = 0
        while (winner["figure_id"], fingerprint) in assigned:
            collision_counter += 1
            basis = "\n".join((
                base_fingerprint, normalise_text(winner.get("source_title")),
                normalise_text(winner.get("quote")), winner["_canonical"],
                str(winner["id"]), str(collision_counter),
            ))
            fingerprint = hashlib.sha256(basis.encode("utf-8")).hexdigest()[:32]
        assigned.add((winner["figure_id"], fingerprint))
        for row in cluster:
            _insert_legacy_provenance(conn, event_id, row)
        for loser in (row for row in cluster if row["id"] != event_id):
            old = list(conn.execute(
                "SELECT * FROM cope_entry_provenance WHERE cope_entry_id=?",
                (loser["id"],),
            ))
            for provenance in old:
                values = dict(provenance)
                conn.execute(
                    """INSERT OR IGNORE INTO cope_entry_provenance
                       (cope_entry_id, observation_key, source_url,
                        canonical_url, source_title, quote, channel,
                        observed_at, created_at, observed_cope_score,
                        observed_cope_type, observed_analysis_md,
                        observed_model, representative_quality,
                        legacy_cope_entry_id)
                       VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
                    (event_id, values["observation_key"], values["source_url"],
                     values["canonical_url"], values["source_title"],
                     values["quote"], values["channel"], values["observed_at"],
                     values["created_at"], values["observed_cope_score"],
                     values["observed_cope_type"],
                     values["observed_analysis_md"], values["observed_model"],
                     values["representative_quality"],
                     values["legacy_cope_entry_id"]),
                )
            conn.execute(
                "DELETE FROM cope_entry_provenance WHERE cope_entry_id=?",
                (loser["id"],),
            )
            conn.execute("DELETE FROM cope_entries WHERE id=?", (loser["id"],))
            merged += 1
        conn.execute(
            """UPDATE cope_entries SET quote=?, source_url=?, source_title=?,
                      canonical_url=?, canonical_url_hash=?, event_fingerprint=?,
                      event_observed_at=?, representative_quality=?,
                      cope_score=?, cope_type=?, analysis_md=?, model=?
                WHERE id=?""",
            (winner.get("quote"), winner.get("source_url"),
             winner.get("source_title"), winner["_canonical"],
             canonical_url_hash(winner["_canonical"]), fingerprint, observed,
             winner["_quality"], winner.get("cope_score"),
             winner.get("cope_type"), winner.get("analysis_md"),
             winner.get("model"), event_id),
        )
    return merged


def recompute_scores(conn):
    changes = []
    for figure in conn.execute("SELECT * FROM figures ORDER BY id"):
        fig = dict(figure)
        rows = [dict(row) for row in conn.execute(
            """SELECT * FROM cope_entries
               WHERE figure_id=? AND
                     lower(coalesce(cope_type,''))
                     NOT IN ('unknown','n/a','none','other','irrelevant','')
               ORDER BY COALESCE(event_observed_at, created_at), id""",
            (fig["id"],),
        )]
        old = float(fig.get("cope_score") or 0)
        if rows:
            current = score_db._public_cope_index(
                rows, fig.get("role") or "", fig.get("type") or "",
                fig.get("category") or "",
            )
            previous = (
                score_db._public_cope_index(
                    rows[:-1], fig.get("role") or "", fig.get("type") or "",
                    fig.get("category") or "",
                ) if len(rows) > 1 else 50.0
            )
            latest = rows[-1]
            conn.execute(
                """UPDATE figures SET cope_score=?, prev_score=?,
                          total_quotes=?, latest_incident=?, last_quote=?,
                          last_cope_type=?, last_scored=?,
                          updated_at=CURRENT_TIMESTAMP WHERE id=?""",
                (current, previous, len(rows),
                 score_db._format_latest_incident(latest),
                 (latest.get("quote") or "")[:500], latest.get("cope_type"),
                 latest.get("event_observed_at") or latest.get("created_at"),
                 fig["id"]),
            )
        else:
            current = 0.0
            conn.execute(
                """UPDATE figures SET cope_score=0, prev_score=0,
                          total_quotes=0, last_quote=NULL, last_cope_type=NULL,
                          last_scored=NULL, updated_at=CURRENT_TIMESTAMP
                    WHERE id=?""",
                (fig["id"],),
            )
        if old != current:
            changes.append({
                "figure_id": fig["id"], "stored_before": old, "after": current,
            })
    return changes


def validate_invariants(conn, *, legacy_ids, before_count, merged_count,
                        score_tolerance=0.11):
    """Return invariant evidence or raise before the caller can commit."""
    integrity_rows = [row[0] for row in conn.execute("PRAGMA integrity_check")]
    integrity_ok = integrity_rows == ["ok"]
    foreign_key_failures = len(list(conn.execute("PRAGMA foreign_key_check")))
    null_event_keys = conn.execute(
        "SELECT COUNT(*) FROM cope_entries WHERE event_fingerprint IS NULL "
        "OR trim(event_fingerprint)=''"
    ).fetchone()[0]
    duplicate_event_keys = conn.execute(
        """SELECT COUNT(*) FROM (
               SELECT figure_id,event_fingerprint
                 FROM cope_entries
                GROUP BY figure_id,event_fingerprint HAVING COUNT(*)>1
           )"""
    ).fetchone()[0]
    orphan_provenance = conn.execute(
        """SELECT COUNT(*) FROM cope_entry_provenance p
             LEFT JOIN cope_entries e ON e.id=p.cope_entry_id
            WHERE e.id IS NULL"""
    ).fetchone()[0]
    events_without_provenance = conn.execute(
        """SELECT COUNT(*) FROM cope_entries e
            WHERE NOT EXISTS (
                SELECT 1 FROM cope_entry_provenance p
                 WHERE p.cope_entry_id=e.id
            )"""
    ).fetchone()[0]
    empty_observation_keys = conn.execute(
        """SELECT COUNT(*) FROM cope_entry_provenance
            WHERE observation_key IS NULL OR trim(observation_key)=''"""
    ).fetchone()[0]

    represented = {
        row[0] for row in conn.execute(
            """SELECT DISTINCT legacy_cope_entry_id
                 FROM cope_entry_provenance
                WHERE legacy_cope_entry_id IS NOT NULL"""
        )
    }
    missing_legacy_ids = sorted(set(legacy_ids) - represented)
    duplicate_legacy_ids = conn.execute(
        """SELECT COUNT(*) FROM (
               SELECT legacy_cope_entry_id
                 FROM cope_entry_provenance
                WHERE legacy_cope_entry_id IS NOT NULL
                GROUP BY legacy_cope_entry_id HAVING COUNT(*)>1
           )"""
    ).fetchone()[0]

    after_count = conn.execute("SELECT COUNT(*) FROM cope_entries").fetchone()[0]
    count_reconciles = before_count - merged_count == after_count
    total_quote_mismatches = conn.execute(
        """SELECT COUNT(*) FROM figures f
            WHERE COALESCE(f.total_quotes,0) != (
                SELECT COUNT(*) FROM cope_entries e
                 WHERE e.figure_id=f.id
                   AND lower(coalesce(e.cope_type,''))
                       NOT IN ('unknown','n/a','none','other','irrelevant','')
            )"""
    ).fetchone()[0]

    score_mismatches = []
    for raw_figure in conn.execute("SELECT * FROM figures ORDER BY id"):
        figure = dict(raw_figure)
        rows = [dict(row) for row in conn.execute(
            """SELECT * FROM cope_entries
               WHERE figure_id=?
                 AND lower(coalesce(cope_type,''))
                     NOT IN ('unknown','n/a','none','other','irrelevant','')
               ORDER BY COALESCE(event_observed_at,created_at),id""",
            (figure["id"],),
        )]
        expected = score_db._public_cope_index(
            rows, figure.get("role") or "", figure.get("type") or "",
            figure.get("category") or "",
        ) if rows else 0.0
        cached = float(figure.get("cope_score") or 0)
        if abs(expected - cached) > score_tolerance:
            score_mismatches.append({
                "figure_id": figure["id"],
                "cached": cached,
                "expected": expected,
            })

    evidence = {
        "integrity_ok": integrity_ok,
        "integrity_result": integrity_rows,
        "foreign_key_failures": foreign_key_failures,
        "null_or_empty_event_keys": null_event_keys,
        "duplicate_event_keys": duplicate_event_keys,
        "orphan_provenance": orphan_provenance,
        "events_without_provenance": events_without_provenance,
        "empty_observation_keys": empty_observation_keys,
        "required_legacy_ids": len(legacy_ids),
        "missing_legacy_ids": missing_legacy_ids,
        "duplicate_legacy_ids": duplicate_legacy_ids,
        "count_reconciles": count_reconciles,
        "before_count": before_count,
        "merged_count": merged_count,
        "after_count": after_count,
        "total_quote_mismatches": total_quote_mismatches,
        "cached_score_mismatches": score_mismatches,
    }
    evidence["passed"] = all((
        integrity_ok,
        foreign_key_failures == 0,
        null_event_keys == 0,
        duplicate_event_keys == 0,
        orphan_provenance == 0,
        events_without_provenance == 0,
        empty_observation_keys == 0,
        not missing_legacy_ids,
        duplicate_legacy_ids == 0,
        count_reconciles,
        total_quote_mismatches == 0,
        not score_mismatches,
    ))
    if not evidence["passed"]:
        raise RuntimeError(
            "migration invariant failure: " + json.dumps(evidence, sort_keys=True)
        )
    return evidence


def apply_migration(conn):
    entry_columns = _columns(conn, "cope_entries")
    if "event_fingerprint" in entry_columns:
        legacy_ids = {
            row[0] for row in conn.execute(
                "SELECT id FROM cope_entries WHERE event_fingerprint IS NULL"
            )
        }
    else:
        legacy_ids = {row[0] for row in conn.execute("SELECT id FROM cope_entries")}
    before = plan(conn)
    ensure_schema(conn)
    merged = apply_event_merge(conn)
    missing = conn.execute(
        "SELECT COUNT(*) FROM cope_entries WHERE event_fingerprint IS NULL"
    ).fetchone()[0]
    if missing:
        raise RuntimeError(f"{missing} cope entries still lack an event identity")
    conn.execute(
        "CREATE UNIQUE INDEX IF NOT EXISTS uq_cope_figure_event "
        "ON cope_entries(figure_id, event_fingerprint)"
    )
    score_changes = recompute_scores(conn)
    invariants = validate_invariants(
        conn,
        legacy_ids=legacy_ids,
        before_count=before["cope_entries_before"],
        merged_count=merged,
    )
    return {
        **before,
        "cope_entries_merged": merged,
        "cope_entries_after": conn.execute(
            "SELECT COUNT(*) FROM cope_entries"
        ).fetchone()[0],
        "provenance_rows": conn.execute(
            "SELECT COUNT(*) FROM cope_entry_provenance"
        ).fetchone()[0],
        "score_cache_changes": score_changes,
        "invariants": invariants,
    }


def backup_database(source_path, backup_dir=None):
    source_path = Path(source_path).resolve()
    target_dir = Path(backup_dir).resolve() if backup_dir else source_path.parent
    target_dir.mkdir(parents=True, exist_ok=True)
    stamp = datetime.now(timezone.utc).strftime("%Y%m%dT%H%M%S%fZ")
    target = target_dir / f"{source_path.name}.bak-cope-events-{stamp}"
    source = sqlite3.connect(
        f"file:{uri_quote(str(source_path), safe='/')}?mode=ro", uri=True
    )
    destination = sqlite3.connect(target)
    try:
        source.backup(destination)
    finally:
        destination.close()
        source.close()
    stat = source_path.stat()
    os.chmod(target, stat.st_mode & 0o7777)
    try:
        os.chown(target, stat.st_uid, stat.st_gid)
    except PermissionError:
        pass
    return target


@contextmanager
def migration_lock(db_path):
    lock_path = Path(str(Path(db_path).resolve()) + ".cope-events.lock")
    with lock_path.open("a+") as handle:
        fcntl.flock(handle.fileno(), fcntl.LOCK_EX)
        try:
            yield
        finally:
            fcntl.flock(handle.fileno(), fcntl.LOCK_UN)


def _connect(path, readonly=False):
    if readonly:
        connection = sqlite3.connect(
            f"file:{uri_quote(str(Path(path).resolve()), safe='/')}?mode=ro",
            uri=True,
        )
    else:
        connection = sqlite3.connect(path, timeout=60)
    connection.row_factory = sqlite3.Row
    connection.execute("PRAGMA foreign_keys=ON")
    return connection


def main(argv=None):
    parser = argparse.ArgumentParser()
    parser.add_argument("--db", required=True)
    parser.add_argument("--apply", action="store_true")
    parser.add_argument("--backup-dir")
    args = parser.parse_args(argv)
    db_path = Path(args.db).resolve()
    if not args.apply:
        connection = _connect(db_path, readonly=True)
        try:
            output = {"mode": "dry-run", **plan(connection)}
        finally:
            connection.close()
        print(json.dumps(output, indent=2, sort_keys=True))
        return 0

    with migration_lock(db_path):
        connection = _connect(db_path)
        try:
            connection.execute("BEGIN IMMEDIATE")
            backup = backup_database(db_path, args.backup_dir)
            output = apply_migration(connection)
            connection.commit()
        except Exception:
            connection.rollback()
            raise
        finally:
            connection.close()
    print(json.dumps({
        "mode": "apply", "backup": str(backup), **output,
    }, indent=2, sort_keys=True))
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
```
