<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cdpop():
 """ Return the last directory. Returns absolute path to new working directory. """

    if len(_cdhist) >= 1:
        old = _cdhist.pop()  # Pop from history.
        os.chdir(old)
        return old
    else:
        return pwd()