def transformer_tpl(data):
    """Generates Mantle transformer
    Output:

    /**
     * Converts '{}' property from '{}' class type.
     *
     * @return NSValueTransformer
     */
    + (NSValueTransformer *)articleJSONTransformer
    {
        return [NSValueTransformer
            mtl_JSONArrayTransformerWithModelClass:XYZArticleModel.class];
    }

    """
    if not data['transform']:
        return None
    if data['transform']['type'] == 'BOOL':
        string = (
            """
/**
 * Converts '{property}' property from BOOL class.
 *
 * @return NSValueTransformer
 */
+ (NSValueTransformer *){property}JSONTransformer {{
    return [NSValueTransformer valueTransformerForName:MTLBooleanValueTransformerName];
}}"""
            .format(property=data['name']))
        return string
    else:
        string = (
            """
/**
 * Converts '{property}' property from '{class_name}' class.
 *
 * @return NSValueTransformer
 */
+ (NSValueTransformer *){property}JSONTransformer {{
    return [NSValueTransformer mtl_JSON{type}TransformerWithModelClass:{class_name}.class];
}}"""
            .format(property=data['name'], type=data['transform']['type'],
            class_name=data['transform']['class']))
        return string
