from pathlib import Path
import yaml


def read_bootstrap_config(config_dir: Path, bootstrap_file_name: str = "bootstrap.yaml") -> dict:
    """ Reads a bootstrap dictionary from a given bootstrap file.

    Args:
        config_dir: The directory in which the bootstray yaml exists.
        bootstrap_file_name: The name of the created bootstrap yaml file.

    Returns:
        dict: The bootstrap dictionary read from the file.
    """
    path = config_dir / bootstrap_file_name
    with open(path, "r") as stream:
        bootstrap = yaml.safe_load(stream)
    return bootstrap