<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sync_to_peer(host, user, paths=None, verbose=False, cmd=None, gid=None, fatal=False):
 """Sync paths to an specific peer host Propagates exception if any operation fails and fatal=True. """

    if paths:
        for p in paths:
            sync_path_to_host(p, host, user, verbose, cmd, gid, fatal)