code: def save_debug_info_for_pipeline(
      pipeline: "Pipeline",
      train_data: "InputData",
      test_data: "InputData",
      exception: Exception,
      stack_trace: str,
  ):
      try:
          tmp_folder = Path(default_fedot_data_dir(), "debug_info")
          if not tmp_folder.exists():
              os.mkdir(tmp_folder)
  
          pipeline_id = str(uuid4())
          base_path = Path(tmp_folder, pipeline_id)
          pipeline.save(
              f"{base_path}_pipeline", is_datetime_in_path=False
          )
  
          with open(f"{base_path}_train_data.pkl", "wb") as file:
              pickle.dump(train_data, file)
          with open(f"{base_path}_test_data.pkl", "wb") as file:
              pickle.dump(test_data, file)
          with open(f"{base_path}_exception.txt", "w") as file:
              print(exception, file=file)
              print(stack_trace, file=file)
      except Exception as ex:
          print(ex)
  
file_path: FEDOT/fedot/utilities/debug.py
imports: import os
  import pickle
  from pathlib import Path
  from typing import TYPE_CHECKING
  from uuid import uuid4
  from fedot.core.utils import default_fedot_data_dir
label_desc: Use image node_id 3 for calling a global function with example usage: save_debug_info_for_pipeline(pipeline, train_data, test_data, exception, stack_trace) without return types