def ratio_description(denominator: float, element: str, numerator: float, condition: str) -> str:
    """
    Return a string for describing a ratio (including a percent representation).
    """
    assert numerator >= 0
    assert denominator > 0

    if int(numerator) == numerator:
        numerator = int(numerator)
    if int(denominator) == denominator:
        denominator = int(denominator)

    percent = (numerator * 100) / denominator
    return f"{numerator} {condition} ({percent:.4g}%) out of {denominator} {element}s"