@classmethod
def DeregisterDecoder(cls, decoder):
    """Deregisters a decoder for a specific encoding method.

    Args:
      decoder (type): decoder class.

    Raises:
      KeyError: if the corresponding decoder is not set.
    """
    encoding_method = decoder.ENCODING_METHOD.lower()
    if encoding_method not in cls._decoders:
        raise KeyError('Decoder for encoding method: {0:s} not set.'.format
            (decoder.ENCODING_METHOD))
    del cls._decoders[encoding_method]
