def symbolize(flt: float) -> sympy.Symbol:
    """Attempt to convert a real number into a simpler symbolic
    representation.

    Returns:
        A sympy Symbol. (Convert to string with str(sym) or to latex with
            sympy.latex(sym)
    Raises:
        ValueError:     If cannot simplify float
    """
    try:
        ratio = rationalize(flt)
        res = sympy.simplify(ratio)
    except ValueError:
        ratio = rationalize(flt/np.pi)
        res = sympy.simplify(ratio) * sympy.pi
    return res
Attempt to convert a real number into a simpler symbolic
    representation.

    Returns:
        A sympy Symbol. (Convert to string with str(sym) or to latex with
            sympy.latex(sym)
    Raises:
        ValueError:     If cannot simplify float