<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _fmt_auto(cls, x, **kw):
 """auto formatting class-method."""

        f = cls._to_float(x)
        if abs(f) > 1e8:
            fn = cls._fmt_exp
        else:
            if f - round(f) == 0:
                fn = cls._fmt_int
            else:
                fn = cls._fmt_float
        return fn(x, **kw)