code: def fit_transform(self, bundle: DataBundle) -> DataBundle:
      x_train = bundle.x_train
      y_train = bundle.y_train
      if not isinstance(x_train, np.ndarray):
          raise ValueError(
              "`PreProcessorBlock` should be used on numpy features."
          )
      if not isinstance(y_train, np.ndarray):
          raise ValueError(
              "`PreProcessorBlock` should be used on numpy labels."
          )
      recognizer = self.recognizer
      if recognizer is None:
          x_target = list(range(x_train.shape[-1]))
          y_target = list(range(y_train.shape[-1]))
      else:
          mapping = recognizer.index_mapping
          x_target = [
              mapping[str_idx]
              for str_idx, column_type in recognizer.feature_types.items()
              if column_type == ColumnTypes.NUMERICAL
          ]
          y_target = [
              int(str_idx)
              for str_idx, column_type in recognizer.label_types.items()
              if column_type == ColumnTypes.NUMERICAL
          ]
      preprocess_methods = self._convert_keys(
          self.config.preprocess_methods
      )
      preprocess_configs = self._convert_keys(
          self.config.preprocess_configs
      )
      l_preprocess_methods = self._convert_keys(
          self.config.label_preprocess_methods
      )
      l_preprocess_configs = self._convert_keys(
          self.config.label_preprocess_configs
      )
  
      self.methods = {}
      self.stats = {}
      self.label_methods = {}
      self.label_stats = {}
      _fit_transform(
          x_train,
          x_target,
          self.config.auto_preprocess,
          preprocess_methods,
          preprocess_configs,
          self.methods,
          self.stats,
      )
      _fit_transform(
          y_train,
          y_target,
          self.config.auto_preprocess,
          l_preprocess_methods,
          l_preprocess_configs,
          self.label_methods,
          self.label_stats,
      )
      if bundle.x_valid is not None:
          self._transform_x(bundle.x_valid)  # type: ignore
      if bundle.y_valid is not None:
          self._transform_y(bundle.y_valid)  # type: ignore
      return bundle
  
imports: import numpy
  from enum import Enum
  from typing import Any
  from typing import Dict
  from typing import List
  from typing import Optional
  from dataclasses import dataclass
  from cftool.misc import safe_execute
  from cftool.misc import shallow_copy_dict
  from cftool.array import normalize
  from cftool.array import normalize_from
  from cftool.array import recover_normalize_from
  from cftool.array import min_max_normalize
  from cftool.array import min_max_normalize_from
  from cftool.array import recover_min_max_normalize_from
  from cftool.array import quantile_normalize
  from cftool.array import quantile_normalize_from
  from cftool.array import recover_quantile_normalize_from
  from .file import FileParserBlock
  from .recognizer import RecognizerBlock
  from ....schema import DataBundle
  from ....schema import ColumnTypes
  from ....schema import INoInitDataBlock
label_desc: Use image node_id 3 for calling the PreProcessorBlock obj's underlying member method code with example usage: obj.fit_transform(bundle) and returns: bundle