<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def coerce(dtype, value):
 """ Convert a value to a specific type. If the value is already the given type, then the original value is returned. If the value is None, then the default value given by the type constructor is returned. Otherwise, the type constructor converts and returns the value. """

    if dtype is None:
        return value
    if type(value).__name__ == dtype:
        return value
    op = COERCION_RULES[dtype]
    return op() if value is None else op(value)