class_docstr: A search 'query'.
docstr: Create a new SearchState where backwards becomes forwards and the other
  way around.
docstr_tok: ["Create","a","new","SearchState","where","backwards","becomes","forwards","and","the","other","way","around","."]
code: def __invert__(self):
      """
      Create a new SearchState where backwards becomes forwards and the other
      way around.
      """
      if self.direction == IncrementalSearchDirection.BACKWARD:
          direction = IncrementalSearchDirection.FORWARD
      else:
          direction = IncrementalSearchDirection.BACKWARD
  
      return SearchState(
          text=self.text,
          direction=direction,
          ignore_case=self.ignore_case,
      )
  
imports: from .enums import IncrementalSearchDirection
  from .filters import to_simple_filter
label_desc: Use image node_id 3 for calling the SearchState obj's underlying member method code with example usage: obj.__invert__() and returns: SearchState