code: def create_class_mapping_from_folder(root_folder):
      classes = []
      for _, directories, _ in os.walk(root_folder):
          for directory in directories:
              classes.append(directory)
      classes.sort()
      return np.asarray(classes)
  
file_path: CNTK/Examples/Image/TransferLearning/TransferLearning_Extended.py
imports: from __future__ import print_function
  import numpy
  import os
  from cntk import load_model
  from TransferLearning import *
label_desc: Use image node_id 2 for calling a global function with example usage: create_class_mapping_from_folder(root_folder) and returns: np