from typing import Any

import yaml


def load(yaml_file:str) -> dict[str, Any]:
    with open(yaml_file, "r", encoding="utf-8") as f:
        return yaml.safe_load(f) or {}

def save(yaml_file:str, data:dict[str, Any]):
    with open(yaml_file, "w", encoding="utf-8") as f:
        yaml.dump(data, f)

