code: def RegisterDecoder(cls, decoder):
      
      encoding_method = decoder.ENCODING_METHOD.lower()
      if encoding_method in cls._decoders:
        raise KeyError(
            'Decoder for encoding method: {0:s} already set.'.format(
                decoder.ENCODING_METHOD))
  
      cls._decoders[encoding_method] = decoder
docs: Registers a decoder for a specific encoding method.
  
      Args:
        decoder (type): decoder class.
  
      Raises:
        KeyError: if the corresponding decoder is already set.