def METHOD_NAME(z: BaseElement) -> Optional[float]:
    """
    Determine the precision of an expression expr.
    If z is a Real value, returns the number of significant
    decimal figures of z. For example,
    ```
    12.345`2
    ```
    which is equivalent to 12.`2  has a precision of 2.
    If the expression contains Real values, returns
    the minimal accuracy of all the numbers in the expression.
    If z is PrecisionReal(0.), the precision is 0. In that case,
    the field "precision" is interpreted as "accuracy".
    Otherwise returns None, representing infinite precision.
    """
    if isinstance(z, MachineReal):
        return MACHINE_PRECISION_VALUE
    if isinstance(z, PrecisionReal):
        if z.is_zero:
            return 0.0
        return float(dps(z.get_precision()))
    if isinstance(z, Complex):
        prec_real = METHOD_NAME(z.real)
        prec_imag = METHOD_NAME(z.imag)
        if prec_real is None or prec_imag == prec_real:
            return prec_imag
        if prec_imag is None:
            return prec_real
        # both numbers have different precision.
        # Evaluate the accuracy and add the log of
        # the module.
        acc = eval_Accuracy(z)
        abs_sq = z.real.value**2 + z.imag.value**2
        return acc + mpmath.log(abs_sq, 10.0) * 0.5
    if isinstance(z, Expression):
        elem_prec = (METHOD_NAME(z_elem) for z_elem in z.elements)
        return min((prec for prec in elem_prec if prec is not None), default=None)
    return None