docs: 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 ValueError:
          return failure_string
      return _saferound(f, decimal_places) + ':1'