<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pop_to(source, dest, key, name=None):
 """ A convenience function which pops a key k from source to dest. None values are not passed on. If k already exists in dest an error is raised. """

    value = source.pop(key, None)
    if value is not None:
        safe_setitem(dest, key, value, name=name)
    return value