def METHOD_NAME(self):
    cmd = (f'losetup --offset {self.offset} --sizelimit {self.size} '
           f'--find --show "{self.filename}"')
    while True:
        try:
            loopdev = get_command_out(cmd)
        except CommandError as e:
            if e.returncode != 1:
                raise
            do('sync')
            time.sleep(1)
        else:
            break
    return loopdev.decode().rstrip('\n')