<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def allow_constructor(target):
 """ Set an allowance on a ``ClassDouble`` constructor This allows the caller to control what a ClassDouble returns when a new instance is created. :param ClassDouble target: The ClassDouble to set the allowance on. :return: an ``Allowance`` for the __new__ method. :raise: ``ConstructorDoubleError`` if target is not a ClassDouble. """

    if not isinstance(target, ClassDouble):
        raise ConstructorDoubleError(
            'Cannot allow_constructor of {} since it is not a ClassDouble.'.format(target),
        )

    return allow(target)._doubles__new__