import yaml


def load_yaml_file(file_name):
    """Load YAML file.

    Parameters
    ----------
        file_name: str or pathlib.Path
            YAML file name.
    Returns
    --------
        dict_data: dict
            YAML contents.
    """
    with open(file_name, 'r') as f:
        dict_data = yaml.load(f, Loader=yaml.SafeLoader)
    return dict_data