Loads a YAML-formatted file.

def load_yaml(filename):
    """
    Loads a YAML-formatted file.
    """
    with open(filename) as f:
        ydoc = yaml.safe_load(f.read())
    return (ydoc, serialize_tojson(ydoc))