code: def apply_type_transformation(
      table: np.ndarray, col_type_ids: Sequence, log: LoggerAdapter
  ):
      """
      Apply transformation for columns in dataset into desired type. Perform
      transformation on predict stage when column types were already determined
      during fit
      """
      table_df = pd.DataFrame(table, copy=False)
      types_sr = pd.Series(col_type_ids).map(
          {
              **{TYPE_TO_ID[t]: t for t in [int, str]},
              **{
                  TYPE_TO_ID[t]: float
                  for t in [bool, type(None), float]
              },
          }
      )
  
      return table_df.apply(
          _convert_predict_column_into_desired_type,
          types_sr=types_sr,
          log=log,
      ).to_numpy()
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  from typing import TYPE_CHECKING, Dict, List, Optional, Tuple
  import numpy
  import pandas
  from golem.core.log import LoggerAdapter, default_log
  from fedot.core.repository.tasks import Task, TaskTypesEnum
label_desc: Use image node_id 4 for calling a global function with example usage: apply_type_transformation(table, col_type_ids, log) and returns: table_df