class_docstr: Responsible for parsing configuration from files and CLI.
  
  There are 2 types of configurations: Run configurations and Check
  configurations.
  
  Run Configurations:
  ------------------
  Responsible for deciding things that are related to the user interface and
  configuration discovery, e.g. verbosity, debug options, etc.
  All run configurations default to `False` or `None` and are decided only
  by CLI.
  
  Check Configurations:
  --------------------
  Configurations that are related to which files and errors will be checked.
  These are configurable in 2 ways: using the CLI, and using configuration
  files.
  
  Configuration files are nested within the file system, meaning that the
  closer a configuration file is to a checked file, the more relevant it will
  be. For instance, imagine this directory structure:
  
  A
  +-- tox.ini: sets `select=D100`
  +-- B
      +-- foo.py
      +-- tox.ini: sets `add-ignore=D100`
  
  Then `foo.py` will not be checked for `D100`.
  The configuration build algorithm is described in `self._get_config`.
  
  Note: If any of `BASE_ERROR_SELECTION_OPTIONS` was selected in the CLI, all
  configuration files will be ignored and each file will be checked for
  the error codes supplied in the CLI.
class_docstr_tok: ["Responsible","for","parsing","configuration","from","files","and","CLI",".","There","are","2","types","of","configurations",":","Run","configurations","and","Check","configurations",".","Run","Configurations",":","--","--","--","--","--","--","--","--","--","Responsible","for","deciding","things","that","are","related","to","the","user","interface","and","configuration","discovery",",","e.g",".","verbosity",",","debug","options",",","etc",".","All","run","configurations","default","to","`","False","`","or","`","None","`","and","are","decided","only","by","CLI",".","Check","Configurations",":","--","--","--","--","--","--","--","--","--","--","Configurations","that","are","related","to","which","files","and","errors","will","be","checked",".","These","are","configurable","in","2","ways",":","using","the","CLI",",","and","using","configuration","files",".","Configuration","files","are","nested","within","the","file","system",",","meaning","that","the","closer","a","configuration","file","is","to","a","checked","file",",","the","more","relevant","it","will","be",".","For","instance",",","imagine","this","directory","structure",":","A","+","--","tox.ini",":","sets","`","select=D100","`","+","--","B","+","--","foo.py","+","--","tox.ini",":","sets","`","add-ignore=D100","`","Then","`","foo.py","`","will","not","be","checked","for","`","D100","`",".","The","configuration","build","algorithm","is","described","in","`","self._get_config","`",".","Note",":","If","any","of","`","BASE_ERROR_SELECTION_OPTIONS","`","was","selected","in","the","CLI",",","all","configuration","files","will","be","ignored","and","each","file","will","be","checked","for","the","error","codes","supplied","in","the","CLI","."]
docstr: Create a `CheckConfiguration` object from `options`.
  
  If `use_defaults`, any of the match options that are `None` will
  be replaced with their default value and the default convention will be
  set for the checked codes.
docstr_tok: ["Create","a","`","CheckConfiguration","`","object","from","`","options","`",".","If","`","use_defaults","`",",","any","of","the","match","options","that","are","`","None","`","will","be","replaced","with","their","default","value","and","the","default","convention","will","be","set","for","the","checked","codes","."]
code: def _create_check_config(cls, options, use_defaults=True):
      """Create a `CheckConfiguration` object from `options`.
  
      If `use_defaults`, any of the match options that are `None` will
      be replaced with their default value and the default convention will be
      set for the checked codes.
  
      """
      checked_codes = None
  
      if cls._has_exclusive_option(options) or use_defaults:
          checked_codes = cls._get_checked_errors(options)
  
      kwargs = dict(checked_codes=checked_codes)
      defaults = {
          "match": "MATCH_RE",
          "match_dir": "MATCH_DIR_RE",
          "ignore_decorators": "IGNORE_DECORATORS_RE",
          "property_decorators": "PROPERTY_DECORATORS",
          "ignore_self_only_init": "IGNORE_SELF_ONLY_INIT",
      }
      for key, default in defaults.items():
          kwargs[key] = (
              getattr(cls, f"DEFAULT_{default}")
              if getattr(options, key) is None and use_defaults
              else getattr(options, key)
          )
      return CheckConfiguration(**kwargs)
  
imports: import copy
  import itertools
  import operator
  import os
  import sys
  from collections import namedtuple
  from collections.abc import Set
  from configparser import NoOptionError, NoSectionError, RawConfigParser
  from functools import reduce
  from re import compile
  from ._version import __version__
  from .utils import log
  from .violations import ErrorRegistry, conventions
label_desc: Use image node_id 13 for calling the ConfigurationParser obj's underlying member method code with example usage: obj._create_check_config(cls, options, use_defaults) and returns: CheckConfiguration