code: def rsync(local_path, remote_path, exclude=None, extra_opts=None):
      
      if not local_path.endswith('/'):
          local_path += '/'
      exclude = exclude or []
      exclude.extend(['*.egg-info', '*.pyc', '.git', '.gitignore',
                      '.gitmodules', '/build/', '/dist/'])
      with hide('running'):
          run("mkdir -p '{}'".format(remote_path))
          return rsync_project(
              remote_path, local_path, delete=True,
              extra_opts='-i --omit-dir-times -FF ' +
                         (extra_opts if extra_opts else ''),
              ssh_opts='-o StrictHostKeyChecking=no',
              exclude=exclude)
docs: Helper to rsync submodules across