[docs]deffraction_to_float(value:str|float|Fraction,/)->float:"""Convert the provided input representing a fraction into a float. Args: value: The input to be converted. Returns: The float representation of the given input. Raises: ValueError: If the input was provided as string but could not be interpreted as fraction. """ifisinstance(value,str):try:value=Fraction(value)exceptValueErroraserr:raiseValueError(f"The provided input '{value}' could not be interpreted as a fraction.")fromerrreturnfloat(value)