code: def check(
      filenames,
      select=None,
      ignore=None,
      ignore_decorators=None,
      property_decorators=None,
      ignore_inline_noqa=False,
      ignore_self_only_init=False,
  ):
      """Generate docstring errors that exist in `filenames` iterable.
  
      By default, the PEP-257 convention is checked. To specifically define the
      set of error codes to check for, supply either `select` or `ignore` (but
      not both). In either case, the parameter should be a collection of error
      code strings, e.g., {'D100', 'D404'}.
  
      When supplying `select`, only specified error codes will be reported.
      When supplying `ignore`, all error codes which were not specified will be
      reported.
  
      Note that ignored error code refer to the entire set of possible
      error codes, which is larger than just the PEP-257 convention. To your
      convenience, you may use `pydocstyle.violations.conventions.pep257` as
      a base set to add or remove errors from.
  
      `ignore_inline_noqa` controls if `# noqa` comments are respected or not.
  
      `ignore_self_only_init` controls if D107 is reported on __init__ only containing `self`.
  
      Examples
      ---------
      >>> check(['pydocstyle.py'])
      <generator object check at 0x...>
  
      >>> check(['pydocstyle.py'], select=['D100'])
      <generator object check at 0x...>
  
      >>> check(['pydocstyle.py'], ignore=conventions.pep257 - {'D100'})
      <generator object check at 0x...>
  
      """
      if select is not None and ignore is not None:
          raise IllegalConfiguration(
              "Cannot pass both select and ignore. "
              "They are mutually exclusive."
          )
      elif select is not None:
          checked_codes = select
      elif ignore is not None:
          checked_codes = list(
              set(violations.ErrorRegistry.get_error_codes())
              - set(ignore)
          )
      else:
          checked_codes = violations.conventions.pep257
  
      for filename in filenames:
          log.info("Checking file %s.", filename)
          try:
              with tk.open(filename) as file:
                  source = file.read()
              for error in ConventionChecker().check_source(
                  source,
                  filename,
                  ignore_decorators,
                  property_decorators,
                  ignore_inline_noqa,
                  ignore_self_only_init,
              ):
                  code = getattr(error, "code", None)
                  if code in checked_codes:
                      yield error
          except (OSError, AllError, ParseError) as error:
              log.warning("Error in file %s: %s", filename, error)
              yield error
          except tk.TokenError:
              yield SyntaxError("invalid syntax in file %s" % filename)
  
imports: import ast
  import string
  import tokenize
  from collections import namedtuple
  from itertools import chain, takewhile
  from re import compile
  from textwrap import dedent
  from .None import violations
  from .config import IllegalConfiguration
  from .parser import AllError, Class, Definition, Function, Method, Module, NestedClass, NestedFunction, Package, ParseError, Parser, StringIO
  from .utils import common_prefix_length, is_blank, log, pairwise, strip_non_alphanumeric
  from .wordlists import IMPERATIVE_BLACKLIST, IMPERATIVE_VERBS, stem
label_desc: Use image node_id 2 for calling a global function with example usage: check(filenames, select, ignore, ignore_decorators, property_decorators, ignore_inline_noqa, ignore__only_init) without return types