def METHOD_NAME(path, use_cache=True):
    # From unitedstates/congress-legislators
    h = hashlib.sha1(open(path, 'rb').read()).hexdigest()
    if use_cache and os.path.exists(path + ".pickle"):
        try:
            store = pickle.load(open(path + ".pickle", 'rb'))
            if store["hash"] == h:
                return store["data"]
        except EOFError:
            pass  # bad .pickle file, pretend it doesn't exist
    # No cached pickled data exists, so load the YAML file.
    print('Loading yaml from scratch. This might take a while...')
    data = yaml.load(open(path))
    # Store in a pickled file for fast access later.
    pickle.dump({"hash": h, "data": data}, open(path + ".pickle", "wb"))
    return data