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 a keyword specification, validate and compute options
docstr_tok: ["Given","a","keyword","specification",",","validate","and","compute","options"]
code: def get_options(cls, items, options, warnfn):
      "Given a keyword specification, validate and compute options"
      options = cls.update_options(options, items)
      for keyword in cls.defaults:
          if keyword in items:
              value = items[keyword]
              allowed = cls.allowed[keyword]
              if isinstance(allowed, set):
                  pass
              elif isinstance(allowed, dict):
                  if not isinstance(value, dict):
                      raise ValueError(
                          f"Value {value!r} not a dict type"
                      )
                  disallowed = set(value.keys()) - set(allowed.keys())
                  if disallowed:
                      raise ValueError(
                          f"Keywords {disallowed!r} for {keyword!r} option not one of {allowed}"
                      )
                  wrong_type = {
                      k: v
                      for k, v in value.items()
                      if not isinstance(v, allowed[k])
                  }
                  if wrong_type:
                      errors = []
                      for k, v in wrong_type.items():
                          errors.append(
                              f"Value {v!r} for {keyword!r} option's {k!r} attribute not of type {allowed[k]!r}"
                          )
                      raise ValueError("\n".join(errors))
              elif isinstance(allowed, list) and value not in allowed:
                  if keyword in cls.custom_exceptions:
                      cls.custom_exceptions[keyword](
                          value, keyword, allowed
                      )
                  else:
                      raise ValueError(
                          f"Value {value!r} for key {keyword!r} not one of {allowed}"
                      )
              elif isinstance(allowed, tuple):
                  if not (allowed[0] <= value <= allowed[1]):
                      info = (keyword, value) + allowed
                      raise ValueError(
                          "Value {!r} for key {!r} not between {} and {}".format(
                              *info
                          )
                      )
              options[keyword] = value
      return cls._validate(options, items, warnfn)
  
imports: from collections import defaultdict
  from ..core import Store
label_desc: Use image node_id 2 for calling the KeywordSettings obj's underlying member method code with example usage: obj.get_options(cls, items, options, warnfn) and returns: cls