<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reversed_dotted_parts(s):
 """ For a string "a.b.c", yields "a.b.c", "a.b", "a". """

    idx = -1
    if s:
        yield s
    while s:
        idx = s.rfind('.', 0, idx)
        if idx == -1:
            break
        yield s[:idx]