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)

[((7, 15, 7, 79), 'pandas.DataFrame', 'pd.DataFrame', (), '', True, 'import pandas as pd\n'), ((10, 18, 10, 32), 'pickle.load', 'pickle.load', ({(10, 30, 10, 31): 'f'}, {}), '(f)', False, 'import pickle\n'), ((11, 16, 11, 30), 'pickle.load', 'pickle.load', ({(11, 28, 11, 29): 'f'}, {}), '(f)', False, 'import pickle\n'), ((12, 15, 12, 29), 'pickle.load', 'pickle.load', ({(12, 27, 12, 28): 'f'}, {}), '(f)', False, 'import pickle\n')]