code: def convert_to_labels(root_operation, prediction):
      if any(
          root_operation == acceptable_model
          for acceptable_model in [
              "logit",
              "lda",
              "qda",
              "mlp",
              "svc",
              "rf",
              "bernb",
          ]
      ):
          preds = np.array(prediction.predict)
          preds[preds >= 0.5] = 1
          preds[preds < 0.5] = 0
      else:
          preds = np.array(prediction.predict, dtype=int)
  
      return preds
  
file_path: FEDOT/examples/simple/classification/classification_with_tuning.py
imports: import numpy
  from golem.core.tuning.simultaneous import SimultaneousTuner
  from sklearn.metrics import roc_auc_score
  from sklearn.model_selection import train_test_split
  from examples.simple.classification.classification_pipelines import classification_random_forest_pipeline
  from fedot.core.data.data import InputData
  from fedot.core.pipelines.tuning.tuner_builder import TunerBuilder
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.metrics_repository import ClassificationMetricsEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from fedot.core.utils import set_random_seed
  from fedot.utilities.synth_dataset_generator import classification_dataset
label_desc: Use image node_id 2 for calling a global function with example usage: convert_to_labels(root_operation, prediction) and returns: preds