def modify_df(df, sentence_length):
    """
    Convert the columns STB_Text from a string of list to a list.
    Gather length of STB_Text/Ref_Text list and filter based on sentence length argument.
    Explode STB_Text and Ref_Text as separate dataframes.
    Filter repetitive sentences within a topic.
    Create a column to join on and a column for unique topic-sentence id.
    :param df: base data frame which has ['STB_Id', 'STB_Grade', 'STB_Section', 'STB_Text', 'Ref_id', 'Ref_Grade',
        'Ref_Section', 'Ref_Text'] columns
    :param sentence_length:  drop row if topic has number of sentences less than or equal to sentence_length
    :return: exploded, enriched STB and Ref data frames
    """
    df['text_len'] = df['text'].apply(lambda x: len(x))
    df = df[df['text_len'] > sentence_length]
    df.drop(['text_len'], axis=1, inplace=True)
    df.reset_index(drop=True, inplace=True)
    df = df.explode('text')
    df['join_id'] = 1
    df.drop_duplicates(subset=['identifier', 'text'], inplace=True)
    df.reset_index(drop=True, inplace=True)
    df.reset_index(inplace=True)
    return df