def ratio(value, decimal_places=0, failure_string='N/A'):
    """
    Converts a floating point value a X:1 ratio.
    
    Number of decimal places set by the `precision` kwarg. Default is one.
    """
    try:
        f = float(value)
    except __HOLE__:
        return failure_string
    return _saferound(f, decimal_places) + ':1'
dataset/ETHPy150Open eyeseast/python-tablefu/table_fu/formatting.py/ratio