<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _split_chglog(path, title):
 """Split a RST file text in two parts. The title argument determine the split point. The given title goes in the bottom part. If the title is not found everything goes in the top part. Return a tuple with the top and bottom parts. """


    with path.open() as f:
        doc = f.readlines()

    has_title = False

    for idx, curr_line in enumerate(doc):

        if title in curr_line:
            prev_line = doc[idx - 1] if idx - 1 < len(doc) else "\n"
            next_line = doc[idx + 1] if idx + 1 < len(doc) else None

            if is_title(prev_line, curr_line, next_line):
                idx = idx if prev_line == "\n" else idx - 1
                has_title = True
                break

    if has_title:
        top, bottom = doc[:idx], doc[idx:]
    else:
        top, bottom = doc, []

    return "".join(top), "".join(bottom)