code: def images_directories(type):
      
      server_config = Config.instance().get_section_config("Server")
  
      paths = []
      img_dir = os.path.expanduser(server_config.get("images_path", "~/GNS3/images"))
      type_img_directory = default_images_directory(type)
      try:
          os.makedirs(type_img_directory, exist_ok=True)
          paths.append(type_img_directory)
      except (OSError, PermissionError):
          pass
      for directory in server_config.get("additional_images_path", "").split(";"):
          paths.append(directory)
      # Compatibility with old topologies we look in parent directory
      paths.append(img_dir)
      # Return only the existings paths
      return [force_unix_path(p) for p in paths if os.path.exists(p)]
docs: Return all directory where we will look for images
      by priority
  
      :param type: Type of emulator