code: def not_(validator, *, msg=None, exc_types=(ValueError, TypeError)):
      """
      A validator that wraps and logically 'inverts' the validator passed to it.
      It will raise a `ValueError` if the provided validator *doesn't* raise a
      `ValueError` or `TypeError` (by default), and will suppress the exception
      if the provided validator *does*.
  
      Intended to be used with existing validators to compose logic without
      needing to create inverted variants, for example, ``not_(in_(...))``.
  
      :param validator: A validator to be logically inverted.
      :param msg: Message to raise if validator fails.
          Formatted with keys ``exc_types`` and ``validator``.
      :type msg: str
      :param exc_types: Exception type(s) to capture.
          Other types raised by child validators will not be intercepted and
          pass through.
  
      :raises ValueError: With a human readable error message,
          the attribute (of type `attrs.Attribute`),
          the validator that failed to raise an exception,
          the value it got,
          and the expected exception types.
  
      .. versionadded:: 22.2.0
      """
      try:
          exc_types = tuple(exc_types)
      except TypeError:
          exc_types = (exc_types,)
      return _NotValidator(validator, msg, exc_types)
  
imports: import operator
  import re
  from contextlib import contextmanager
  from re import Pattern
  from ._config import get_run_validators, set_run_validators
  from ._make import _AndValidator, and_, attrib, attrs
  from .converters import default_if_none
  from .exceptions import NotCallableError
label_desc: Use image node_id 19 for calling a global function with example usage: not_(validator) and returns: _NotValidator