<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def Rsync(url, tgt_name, tgt_root=None):
 """ RSync a folder. Args: url (str):
 The url of the SOURCE location. fname (str):
 The name of the TARGET. to (str):
 Path of the target location. Defaults to ``CFG["tmpdir"]``. """

    if tgt_root is None:
        tgt_root = str(CFG["tmp_dir"])

    from benchbuild.utils.cmd import rsync

    tgt_dir = local.path(tgt_root) / tgt_name
    if not source_required(tgt_dir):
        Copy(tgt_dir, ".")
        return

    rsync("-a", url, tgt_dir)
    update_hash(tgt_dir)
    Copy(tgt_dir, ".")