docs: def filter_words(words, filters_in=None, filters_out=None, flags=0):
      """
      Filters the words using the given filters.
  
      Usage::
  
          >>> filter_words(["Users", "are", "John", "Doe", "Jane", "Doe", "Z6PO"], filters_in=("John", "Doe"))
          [u'John', u'Doe', u'Doe']
          >>> filter_words(["Users", "are", "John", "Doe", "Jane", "Doe", "Z6PO"], filters_in=("\w*r",))
          [u'Users', u'are']
          >>> filter_words(["Users", "are", "John", "Doe", "Jane", "Doe", "Z6PO"], filters_out=("\w*o",))
          [u'Users', u'are', u'Jane', u'Z6PO']
  
      :param filters_in: Regex filters in list.
      :type filters_in: tuple or list
      :param filters_in: Regex filters out list.
      :type filters_in: tuple or list
      :param flags: Regex flags.
      :type flags: int
      :return: Filtered words.
      :rtype: list
      """
  
      filtered_words = []
      for word in words:
          if filters_in:
              filter_matched = False
              for filter in filters_in:
                  if not re.search(filter, word, flags):
                      LOGGER.debug("> '{0}' word skipped, filter in '{1}' not matched!".format(word, filter))
                  else:
                      filter_matched = True
                      break
              if not filter_matched:
                  continue
  
          if filters_out:
              filter_matched = False
              for filter in filters_out:
                  if re.search(filter, word, flags):
                      LOGGER.debug("> '{0}' word skipped, filter out '{1}' matched!".format(word, filter))
                      filter_matched = True
                      break
              if filter_matched:
                  continue
          filtered_words.append(word)
      LOGGER.debug("> Filtered words: '{0}'".format(", ".join(filtered_words)))
      return filtered_words