<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _remap_dirname(local, remote):
 """Remap directory names from local to remote. """

    def do(x):
        return x.replace(local, remote, 1)
    return do