import pathlib
import yaml


def create_experiment_yaml(
    filename: str = "experiment", file_path: str = "Experiments/"
) -> dict:
    """Create a yaml file

        Args:
            file_path: Path to file ending in "/"

        Returns:
            dict: empty dictionary ready to write parameters to

    """
    pathlib.Path(file_path).mkdir(parents=True, exist_ok=True)
    if not pathlib.Path(file_path + filename + ".yaml").is_file():
        with open(file_path + filename + ".yaml", "w") as file:
            file.write("{}")

    with open(file_path + filename + ".yaml", "r") as file:
        experiment_yaml = yaml.safe_load(file)

    return experiment_yaml