Get TurboCARTO CartoCSS based on input parameters

def get_scheme_cartocss(column, scheme_info):
    """Get TurboCARTO CartoCSS based on input parameters"""
    if 'colors' in scheme_info:
        color_scheme = '({})'.format(','.join(scheme_info['colors']))
    else:
        color_scheme = 'cartocolor({})'.format(scheme_info['name'])
    if not isinstance(scheme_info['bins'], int):
        bins = ','.join(str(i) for i in scheme_info['bins'])
    else:
        bins = scheme_info['bins']
    bin_method = scheme_info['bin_method']
    comparison = ', {}'.format(BinMethod.mapping.get(bin_method, '>='))
    return ('ramp([{column}], {color_scheme}, '
            '{bin_method}({bins}){comparison})').format(
                column=column,
                color_scheme=color_scheme,
                bin_method=bin_method,
                bins=bins,
                comparison=comparison)