from typing import Dict
from typing import Any
import yaml
from pathlib import Path


def read_yaml_file(filename: str) -> Dict[str, Any]:
    """Reads a YAML file, safe loads, and returns the dictionary"""
    cfg: Dict[str, Any] = yaml.safe_load(Path(filename).read_text())
    return cfg