<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _activate_thin_device(name, dm_id, size, pool):
 """ Provisions an LVM device-mapper thin device reflecting, DM device id 'dm_id' in the docker pool. """

        table = '0 %d thin /dev/mapper/%s %s' % (int(size) // 512, pool, dm_id)
        cmd = ['dmsetup', 'create', name, '--table', table]
        r = util.subp(cmd)
        if r.return_code != 0:
            raise MountError('Failed to create thin device: %s' %
                             r.stderr.decode(sys.getdefaultencoding()))