docs: def clean_path_from_deprecated_naming(base_path):
      """ Checks if the base path includes deprecated characters/format and returns corrected version
  
      The state machine folder name should be according the universal RAFCON path format. In case the state machine path
      is inside a mounted library_root_path also the library_path has to have this format. The library path is a
      partial path of the state machine path. This rules are followed to always provide secure paths for RAFCON and all
      operating systems.
  
      :param base_path:
      :return: cleaned base_path
      :rtype: str
      """
      def warning_logger_message(insert_string):
          not_allowed_characters = "'" + "', '".join(REPLACED_CHARACTERS_FOR_NO_OS_LIMITATION.keys()) + "'"
          logger.warning("Deprecated {2} in {0}. Please avoid to use the following characters {1}."
                         "".format(base_path, not_allowed_characters, insert_string))
      from rafcon.core.singleton import library_manager
      if library_manager.is_os_path_within_library_root_paths(base_path):
          library_path, library_name = library_manager.get_library_path_and_name_for_os_path(base_path)
          clean_library_path = clean_path(library_path)
          clean_library_name = clean_path(library_name)
          if library_name != clean_library_name or library_path != clean_library_path:
              warning_logger_message("library path")
          library_root_key = library_manager._get_library_root_key_for_os_path(base_path)
          library_root_path = library_manager._library_root_paths[library_root_key]
          clean_base_path = os.path.join(library_root_path, clean_library_path, clean_library_name)
      else:
          path_elements = base_path.split(os.path.sep)
          state_machine_folder_name = base_path.split(os.path.sep)[-1]
          path_elements[-1] = clean_path(state_machine_folder_name)
          if not state_machine_folder_name == path_elements[-1]:
              warning_logger_message("state machine folder name")
          clean_base_path = os.path.sep.join(path_elements)
      return clean_base_path