def section_decision(indexer, sentence, offset_list, end_matches):
    """Decides what section mask token is in

    Returns a specific section of the sentence given which error is being worked on by splitting the text
    at the offset given in the offset_list.
    """
    if indexer == 0:
        # First section:
        mask_str = sentence[:offset_list[indexer]]

    elif indexer == (len(end_matches) - 1):
        # The last section:
        mask_str = sentence[offset_list[indexer - 1]:]

    else:
        # Any middle sections:
        mask_str = sentence[offset_list[indexer - 1]:offset_list[indexer]]

    return mask_str