<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_thin_device(name, force=False):
 """ Destroys a thin device via subprocess call. """

        cmd = ['dmsetup', 'remove', '--retry', name]
        r = util.subp(cmd)
        if not force:
            if r.return_code != 0:
                raise MountError('Could not remove thin device:\n%s' %
                                 r.stderr.decode(sys.getdefaultencoding()).split("\n")[0])