def format_states(states):
    """
    Format logging states to prettify logging information

    Args:
        states: logging states

    Returns:
        - formated logging states
    """
    formated_states = {}
    for key, val in states.items():
        if isinstance(val, float):
            if val < 1e-3:
                val = '{:.4e}'.format(val)
            else:
                val = '{:.4f}'.format(val)
        formated_states[key] = val
    return formated_states