code: def create_correct_path(path: str, dirname_flag: bool = False):
      """
      Create path with time which was created during the testing process.
      """
      # TODO: this function is used in many places, but now is not really needed
      last_el = None
      for dirname in next(os.walk(os.path.curdir))[1]:
          if dirname.endswith(path):
              if dirname_flag:
                  last_el = dirname
              else:
                  file = os.path.join(dirname, path + ".json")
                  last_el = file
      return last_el
  
file_path: FEDOT/examples/simple/pipeline_import_export.py
imports: import json
  import os
  import numpy
  from examples.simple.regression.regression_with_tuning import get_regression_dataset
  from examples.simple.regression.regression_pipelines import regression_ransac_pipeline
  from fedot.core.data.data import InputData
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from fedot.core.utils import fedot_project_root
label_desc: Use image node_id 1 for calling a global function with example usage: create_correct_path(path, dirname_flag) and returns: last_el