def percentage(value, decimal_places=1, multiply=True, failure_string='N/A'):
    """
    Converts a floating point value into a percentage value.
    
    Number of decimal places set by the `decimal_places` kwarg. Default is one.
    
    By default the number is multiplied by 100. You can prevent it from doing
    that by setting the `multiply` keyword argument to False.
    
    If the submitted value isn't a string, returns the `failure_string` keyword
    argument.
    """
    try:
        value = float(value)
    except __HOLE__:
        return failure_string
    if multiply:
        value = value * 100
    return _saferound(value, decimal_places) + '%'
dataset/ETHPy150Open eyeseast/python-tablefu/table_fu/formatting.py/percentage