def METHOD_NAME(env: "xgb.core.CallbackEnv") -> str:  # type: ignore
    """Return whether the current callback context is cv or train.
    .. note::
        `Reference
        <https://github.com/dmlc/xgboost/blob/master/python-package/xgboost/callback.py>`_.
    """
    if env.model is None and env.cvfolds is not None:
        context = "cv"
    else:
        context = "train"
    return context