code: def sort_key(source_dir):
      """Sorts tutorials and guides in a predefined order.
  
      If the predefined order doesn't include the filename we're looking for,
      fallback to alphabetical order.
      """
      core_order = [
          "run_core_concepts.py",
          "run_corpora_and_vector_spaces.py",
          "run_topics_and_transformations.py",
          "run_similarity_queries.py",
      ]
  
      tutorials_order = [
          "run_word2vec.py",
          "run_doc2vec_lee.py",
          "run_fasttext.py",
          "run_ensemblelda.py",
          "run_annoy.py",
          "run_lda.py",
          "run_wmd.py",
          "run_scm.py",
      ]
  
      howto_order = [
          "run_downloader_api.py",
          "run_binder.py",
          "run_doc.py",
          "run_doc2vec_imdb.py",
          "run_news_classification.py",
          "run_compare_lda.py",
      ]
  
      order = core_order + tutorials_order + howto_order
      files = sorted(os.listdir(source_dir))
  
      def key(arg):
          try:
              return order.index(arg)
          except ValueError:
              return files.index(arg)
  
      return key
  
label_desc: Use image node_id 1 for calling a global function with example usage: sort_key(source_dir) and returns: key, order, files