import tempfile
import yaml


def operator_settings_file(settings: dict = {}) -> str:
    """Yield the path to a file with settings saved as YAML."""
    operator_file = tempfile.mkstemp()[1]
    with open(operator_file, "w") as f:
        yaml.safe_dump(settings, f)
    return operator_file