code: def list_string_to_dict(string):
      """Inputs ``['a', 'b', 'c']``, returns ``{'a': 0, 'b': 1, 'c': 2}``."""
      dictionary = {}
      for idx, c in enumerate(string):
          dictionary.update({c: idx})
      return dictionary
  
imports: import os
  import random
  import subprocess
  import sys
  import time
  from collections import Counter
  from sys import exit
  from sys import platform
  import numpy
  import tensorflow
  from sklearn.metrics import accuracy_score, confusion_matrix, f1_score
  import tensorlayer
label_desc: Use image node_id 9 for calling a global function with example usage: list_string_to_dict(string) and returns: dictionary