def _get_early_stop_callback_attrs(callback):
    try:
        return (callback.stopped_epoch, callback.restore_best_weights, callback.patience)
    except Exception:
        return None
def _get_early_stop_callback_attrs(callback):
    try:
        return (callback.stopped_epoch, callback.restore_best_weights, callback.patience)
    except Exception:
        return None