docs: def pre_filter(self):
          """ Return rTorrent condition to speed up data transfer.
          """
          if self._name not in self.PRE_FILTER_FIELDS or self._template:
              return ''
          if not self._value:
              return '"equal={},cat="'.format(self.PRE_FILTER_FIELDS[self._name])
  
          if self._is_regex:
              needle = self._value[1:-1]
              needle = self.CLEAN_PRE_VAL_RE.sub(' ', needle)
              needle = self.SPLIT_PRE_VAL_RE.split(needle)
          else:
              needle = self.CLEAN_PRE_VAL_RE.sub(' ', self._value)
              needle = self.SPLIT_PRE_GLOB_RE.split(needle)
          needle = list(sorted(needle, key=len))[-1]
  
          if needle:
              try:
                  needle.encode('ascii')
              except UnicodeEncodeError:
                  return ''
              else:
                  return r'"string.contains_i=${},\"{}\""'.format(
                         self.PRE_FILTER_FIELDS[self._name], needle.replace('"', r'\\\"'))
  
          return ''