import yaml


def load_file(filename):
    """
    Loads a YAML file and returns the document contents.

    :param filename: YAML file name.
    :type filename: unicode | str
    :return: Contents of the YAML file.
    """
    with open(filename, 'r') as f:
        return yaml.safe_load(f)