code: def transform(
      self, bundle: DataBundle, for_inference: bool
  ) -> DataBundle:
      self._transform_x(bundle.x_train)  # type: ignore
      if bundle.y_train is not None:
          self._transform_y(bundle.y_train)  # type: ignore
      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 2 for calling the PreProcessorBlock obj's underlying member method code with example usage: obj.transform(bundle, for_inference) and returns: bundle