code: def validate_config(config, schema=CLUSTER_CONFIG_SCHEMA):
      
      if not isinstance(config, dict):
          raise ValueError("Config {} is not a dictionary".format(config))
  
      check_required(config, schema)
      check_extraneous(config, schema)
docs: Required Dicts indicate that no extra fields can be introduced.