<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _rgetattr(obj, key):
 """Recursive getattr for handling dots in keys."""

    for k in key.split("."):
        obj = getattr(obj, k)
    return obj