def METHOD_NAME(file_struct, rootpath, output_path, annot_beats):
    msaf.utils.ensure_dir(output_path)
    msaf.utils.ensure_dir(os.path.join(output_path, "features"))
    data_file = '%s/features/%s_annotbeatsE%d.pickle' % \
        (output_path, os.path.splitext(
            os.path.basename(file_struct.audio_file))[0], annot_beats)
    if os.path.exists(data_file):
        with open(data_file, 'r') as f:
            Data = pickle.load(f)
            print(file_struct.audio_file, 'cached!')
    else:
        X, _ = features(file_struct, annot_beats)
        pcp_obj = Features.select_features("pcp", file_struct, annot_beats,
                                           framesync=False)
        B = pcp_obj.frame_times[:pcp_obj.features.shape[0]]
        if X is None:
            return X
        Y, T, L = align_segmentation(
            get_annotation(file_struct.audio_file, rootpath), B,
            file_struct.audio_file)
        if Y is None:
            return Y
        Data = {'features': X,
                'beats': B,
                'filename': file_struct.audio_file,
                'segment_times': T,
                'segment_labels': L,
                'segments': Y}
        print(file_struct.audio_file, 'processed!')
        with open(data_file, 'w') as f:
            pickle.dump(Data, f)
    return Data