def METHOD_NAME(z: BaseElement) -> Optional[float]:
    """
    Determine the accuracy of an expression expr.
    If z is a Real value, returns a Python float value
    representing the difference between the number of
    significant decimal figures (Precision) and log_10(z).
    For example,
    ```
    12.345`2
    ```
    which is equivalent to 12.`2  has an accuracy of:
    ```
    0.908509 == 2. -  log(10, 12.345)
    ```
    If the expression contains Real values, returns
    the minimal accuracy of all the numbers in the expression.
    Otherwise returns None, representing infinite accuracy.
    """
    if isinstance(z, MachineReal):
        if z.is_zero:
            return ZERO_MACHINE_ACCURACY
        z_f = z.to_python()
        log10_z = mpmath.log((-z_f if z_f < 0 else z_f), 10)
        return MACHINE_PRECISION_VALUE - log10_z
    if isinstance(z, PrecisionReal):
        if z.is_zero:
            return float(dps(z.get_precision()))
        z_f = z.to_python()
        log10_z = mpmath.log((-z_f if z_f < 0 else z_f), 10)
        return dps(z.get_precision()) - log10_z
    if isinstance(z, Complex):
        acc_real = METHOD_NAME(z.real)
        acc_imag = METHOD_NAME(z.imag)
        if acc_real is None:
            return acc_imag
        if acc_imag is None:
            return acc_real
        return -mpmath.log(10 ** (-2 * acc_real) + 10 ** (-2 * acc_imag), 10.0) * 0.5
    if isinstance(z, Expression):
        elem_accuracies = (METHOD_NAME(z_elem) for z_elem in z.elements)
        return min((acc for acc in elem_accuracies if acc is not None), default=None)
    return None