Return md5sum of remote file

def md5sum(filename, use_sudo=False):
    """Return md5sum of remote file"""
    runner = sudo if use_sudo else run
    with hide('commands'):
        return runner("md5sum '{}'".format(filename)).split()[0]