code: def get_substitutions_from_config(config):
      result = []
      pattern_names = config.options(SUBSTITUTION_SECTION)
      pattern_names.sort()
      for name in pattern_names:
          pattern_val = config.get(SUBSTITUTION_SECTION, name)
          list_rep = ast.literal_eval(pattern_val)
          substitution = parse_substitution_from_list(list_rep)
          result.append(substitution)
      return result