def __select_compress_method(self, options, silent): # {{{3
    valid_formats = self.compressors.keys()
    selected_format = self.compression_method.lower()
    if valid_formats not in selected_format:
      self.logger.warning("Invalid compression format `%s' selected!", selected_format)
      selected_format = 'none'
    if selected_format != 'none':
      if not silent:
        self.logger.debug("Using the %s compression method.", selected_format)
      # My custom LZO binding defines set_block_size() which enables
      # optimizations like preallocating a buffer that can be reused for
      # every call to compress() and decompress().
      if selected_format == 'lzo':
        module = __import__('lzo')
        if hasattr(module, 'set_block_size'):
          module.set_block_size(self.block_size)
    self.compress, self.decompress = self.compressors[selected_format]
dataset/ETHPy150Open xolox/dedupfs/dedupfs.py/DedupFS.__select_compress_method/swapped operands of `not in`