code: def __search_text_check_convert(cls, text):
          
          text = cls.check_convert_string(text, name='text', no_leading_trailing_whitespace=False)
          if len(text) > VALIDATION_META_SEARCH_TEXT:
              raise ValueError("Search text can contain at most %d characters" % VALIDATION_META_SEARCH_TEXT)
          text = ' '.join(_PATTERN_WORDS.findall(text))
          if not text:
              raise ValueError('Search text must contain at least one non-whitespace term (word)')
          return text
docs: Converts and keeps only words in text deemed to be valid