class_docstr: Helper object that allows to configure `characters` strategy with
  various unicode categories and characters. Also allows negation of
  configured set.
  
  :param negate: If True, configure :func:`hypothesis.strategies.characters`
      to match anything other than configured character set
  :param flags: Regex flags. They affect how and which characters are matched
class_docstr_tok: ["Helper","object","that","allows","to","configure","`","characters","`","strategy","with","various","unicode","categories","and","characters",".","Also","allows","negation","of","configured","set",".",":","param","negate",":","If","True",",","configure",":","func",":","`","hypothesis.strategies.characters","`","to","match","anything","other","than","configured","character","set",":","param","flags",":","Regex","flags",".","They","affect","how","and","which","characters","are","matched"]
docstr: Update unicode state to match sre_parse object ``category``.
docstr_tok: ["Update","unicode","state","to","match","sre_parse","object","``","category","``","."]
code: def add_category(self, category):
      """Update unicode state to match sre_parse object ``category``."""
      if category == sre.CATEGORY_DIGIT:
          self._categories |= UNICODE_DIGIT_CATEGORIES
      elif category == sre.CATEGORY_NOT_DIGIT:
          self._categories |= (
              UNICODE_CATEGORIES - UNICODE_DIGIT_CATEGORIES
          )
      elif category == sre.CATEGORY_SPACE:
          self._categories |= UNICODE_SPACE_CATEGORIES
          self._whitelist_chars |= UNICODE_SPACE_CHARS
      elif category == sre.CATEGORY_NOT_SPACE:
          self._categories |= (
              UNICODE_CATEGORIES - UNICODE_SPACE_CATEGORIES
          )
          self._blacklist_chars |= UNICODE_SPACE_CHARS
      elif category == sre.CATEGORY_WORD:
          self._categories |= UNICODE_WORD_CATEGORIES
          self._whitelist_chars.add("_")
      elif category == sre.CATEGORY_NOT_WORD:
          self._categories |= (
              UNICODE_CATEGORIES - UNICODE_WORD_CATEGORIES
          )
          self._blacklist_chars.add("_")
      else:
          raise NotImplementedError(
              f"Unknown character category: {category}"
          )
  
imports: import operator
  import re
  from hypothesis.errors import InvalidArgument
  from hypothesis.internal import charmap
  from hypothesis.strategies._internal.lazy import unwrap_strategies
  from hypothesis.strategies._internal.strings import OneCharStringStrategy
  from hypothesis import reject, strategies
  from hypothesis.internal.charmap import as_general_categories, categories
  from hypothesis.internal.compat import add_note, int_to_byte
label_desc: Use image node_id 3 for calling the CharactersBuilder obj's underlying member method code with example usage: obj.add_category(category) without return types