<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _compress(self, value, module_name):
 """Compress the value passed in using the named compression module. :param bytes value: The uncompressed value :rtype: bytes """

        self.logger.debug('Decompressing with %s', module_name)
        if not isinstance(value, bytes):
            value = value.encode('utf-8')
        return self._maybe_import(module_name).compress(value)