code: def format(self, message_format):
          
          if message_format not in self.formats:
              self._log.error('Invalid Message format specified: {format}'.format(format=message_format))
              return
  
          self._log.debug('Setting message format to {format}'.format(format=message_format))
          self._format = message_format
docs: Set the message format
          :param message_format: The format to set
          :type  message_format: str