code: def _parse_categorical(line):
      # Categorical Lines consist of:
      #
      # <name><w*>{<values>}<w*>[<default>]<*w>#Comment
      # where:
      # <name> - name of parameter.
      # <values> - comma seperated list of values (i.e. a,b,c,d...,z)
      # <default> - default value enclosed in braces.
      # <w*> - zero or more whitespace characters
      # has_comment = False
      # comment = ""
      if "#" in line:
          comment_begins = line.find("#")
          line = line[:comment_begins]
          # comment = line[comment_begins:]
          # has_comment = True
  
      if line.count("{") != 1 or line.count("}") != 1:
          raise ValueError("Malformed parameter line %s" % line)
  
      first_bracket = line.find("{")
      second_bracket = line.find("}")
      domain_values = line[first_bracket + 1 : second_bracket]
      cat_values = domain_values.split(",")
      if len(cat_values) < 1:
          raise ValueError("Expected at least one value in %s" % line)
      name = line[:first_bracket].strip()
      values = [value.strip() for value in cat_values]
  
      # Stripped the code for the default value since we don't need it here
  
      od = OrderedDict()
      od["name"] = name
      od["values"] = values
      return od
  
file_path: auto-sklearn/autosklearn/metalearning/optimizers/optimizer_base.py
imports: import subprocess
  from collections import OrderedDict
  from io import StringIO
  from itertools import product
label_desc: Use image node_id 1 for calling a global function with example usage: _parse_categorical(line) and returns: od