code: def log_evaluation(
      period: int = 1, show_stdv: bool = True
  ) -> _LogEvaluationCallback:
      """Create a callback that logs the evaluation results.
  
      By default, standard output resource is used.
      Use ``register_logger()`` function to register a custom logger.
  
      Note
      ----
      Requires at least one validation data.
  
      Parameters
      ----------
      period : int, optional (default=1)
          The period to log the evaluation results.
          The last boosting stage or the boosting stage found by using ``early_stopping`` callback is also logged.
      show_stdv : bool, optional (default=True)
          Whether to log stdv (if provided).
  
      Returns
      -------
      callback : _LogEvaluationCallback
          The callback that logs the evaluation results every ``period`` boosting iteration(s).
      """
      return _LogEvaluationCallback(period=period, show_stdv=show_stdv)
  
imports: from collections import OrderedDict
  from dataclasses import dataclass
  from functools import partial
  from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
  from .basic import Booster, _ConfigAliases, _LGBM_BoosterEvalMethodResultType, _LGBM_BoosterEvalMethodResultWithStandardDeviationType, _log_info, _log_warning
label_desc: Use image node_id 2 for calling a global function with example usage: log_evaluation(period, show_stdv) and returns: _LogEvaluationCallback