import pickle
import pandas as pd
from typing import List, Tuple

def load_libofc_df(data_path):
    def tuple_to_df(data: List[Tuple]) -> pd.DataFrame:
        return pd.DataFrame(data, columns=["class", "title", "synopsis", "id"])

    with open(data_path, 'rb') as f:
        classes = pickle.load(f)
        train = pickle.load(f)
        test = pickle.load(f)

    return classes, tuple_to_df(train), tuple_to_df(test)

[((168, 232), 'pandas.DataFrame', 'pd.DataFrame', (['data'], {'columns': "['class', 'title', 'synopsis', 'id']"}), "(data, columns=['class', 'title', 'synopsis', 'id'])\n", (180, 232), True, 'import pandas as pd\n'), ((289, 303), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', (300, 303), False, 'import pickle\n'), ((320, 334), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', (331, 334), False, 'import pickle\n'), ((350, 364), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', (361, 364), False, 'import pickle\n')]