class_docstr: Base class for options settings used to specified collections of
  keyword options.
class_docstr_tok: ["Base","class","for","options","settings","used","to","specified","collections","of","keyword","options","."]
docstr: Given the keyword string, parse a dictionary of options.
docstr_tok: ["Given","the","keyword","string",",","parse","a","dictionary","of","options","."]
code: def extract_keywords(cls, line, items):
      """
      Given the keyword string, parse a dictionary of options.
      """
      unprocessed = list(reversed(line.split("=")))
      while unprocessed:
          chunk = unprocessed.pop()
          key = None
          if chunk.strip() in cls.allowed:
              key = chunk.strip()
          else:
              raise SyntaxError(f"Invalid keyword: {chunk.strip()}")
          # The next chunk may end in a subsequent keyword
          value = unprocessed.pop().strip()
          if len(unprocessed) != 0:
              # Check if a new keyword has begun
              for option in cls.allowed:
                  if value.endswith(option):
                      value = value[: -len(option)].strip()
                      unprocessed.append(option)
                      break
              else:
                  raise SyntaxError(
                      f"Invalid keyword: {value.split()[-1]}"
                  )
          keyword = f"{key}={value}"
          try:
              items.update(eval(f"dict({keyword})"))
          except Exception:
              raise SyntaxError(
                  f"Could not evaluate keyword: {keyword}"
              ) from None
      return items
  
imports: from collections import defaultdict
  from ..core import Store
label_desc: Use image node_id 4 for calling the KeywordSettings obj's underlying member method code with example usage: obj.extract_keywords(cls, line, items) and returns: items