"""Operator attribution — embeds operator name in scan record and report."""

from __future__ import annotations


def embed_operator(operator: str | None, record_dict: dict) -> dict:
    """
    Embed operator name into a scan record dict.

    Args:
        operator: Operator name string, or None
        record_dict: Mutable dict representing the scan record

    Returns:
        The same dict with 'operator' key set.
    """
    record_dict["operator"] = operator
    return record_dict
