code: def pre_filter(self):
          
          if len(self) == 1:
              return self[0].pre_filter()
          else:
              result = [x.pre_filter() for x in self if not isinstance(x, CompoundFilterBase)]
              result = [x for x in result if x]
              if result:
                  if int(config.fast_query) == 1:
                      return result[0]  # using just one simple expression is safer
                  else:
                      # TODO: make this purely value-based (is.nz=…)
                      return 'and={%s}' % ','.join(result)
          return ''
docs: Return rTorrent condition to speed up data transfer.