<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def basename(path):
 """Rightmost part of path after separator."""

    base_path = path.strip(SEP)
    sep_ind = base_path.rfind(SEP)
    if sep_ind < 0:
        return path

    return base_path[sep_ind + 1:]