def qemu_rebase(target, backing_file, safe=True, fail_on_error=True):
cmd = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', backing_file, target]<EOL>if not safe:<EOL><INDENT>cmd.insert(<NUM_LIT:2>, '<STR_LIT>')<EOL><DEDENT>return run_command_with_validation(<EOL>cmd,<EOL>fail_on_error,<EOL>msg='<STR_LIT>'.format(<EOL>target=target, backing_file=backing_file<EOL>)<EOL>)<EOL>
changes the backing file of 'source' to 'backing_file'
If backing_file is specified as "" (the empty string),
then the image is rebased onto no backing file
(i.e. it will exist independently of any backing file).
(Taken from qemu-img man page)

Args:
    target(str): Path to the source disk
    backing_file(str): path to the base disk
    safe(bool): if false, allow unsafe rebase
     (check qemu-img docs for more info)