code: def dataset_recorder():
      """Build a `LambdaCallback` that records the current state of all datasets `on_fold_start` in
      order to validate modifications made by
      :class:`feature_engineering.FeatureEngineer`/:class:`feature_engineering.EngineerStep`
  
      Returns
      -------
      LambdaCallback
          Aggregator-like `LambdaCallback` whose values are aggregated under the name "_datasets" and
          whose keys are named after the corresponding callback methods
      """
  
      def _on_fold(data_train, data_oof, data_holdout, data_test):
          d = dict(
              data_train=deepcopy(data_train),
              data_oof=deepcopy(data_oof),
              data_holdout=deepcopy(data_holdout),
              data_test=deepcopy(data_test),
          )
          return d
  
      return lambda_callback(
          on_fold_start=_on_fold,
          agg_name="datasets",
          method_agg_keys=True,
      )
  
file_path: hyperparameter_hunter/hyperparameter_hunter/callbacks/recipes.py
imports: from hyperparameter_hunter.callbacks.bases import lambda_callback
  from hyperparameter_hunter.data.data_chunks.target_chunks import TrainTargetChunk
  from hyperparameter_hunter.metrics import get_clean_prediction
  from copy import deepcopy
  import numpy
  from typing import List, Optional
  from sklearn.metrics import confusion_matrix
label_desc: Use image node_id 4 for calling a global function with example usage: dataset_recorder() and returns: lambda_callback, d