class_docstr: Common base class for all of DataLad's special remote implementations
class_docstr_tok: ["Common","base","class","for","all","of","DataLad","'s","special","remote","implementations"]
code: def message(self, msg, type="debug"):
      handler = dict(
          debug=self.annex.debug,
          info=self.annex.info,
          error=self.annex.error,
      ).get(type, self.annex.debug)
  
      # ensure that no multiline messages are sent, they would cause a
      # protocol error
      msg = msg.replace("\n", "\\n")
  
      try:
          handler(msg)
      except ProtocolError:
          # INFO not supported by annex version.
          # If we can't have an actual info message, at least have a
          # debug message.
          self.annex.debug(msg)
  
file_path: datalad/datalad/customremotes/__init__.py
imports: from annexremote import ProtocolError, SpecialRemote, RemoteError
  from datalad.support.exceptions import format_exception_with_cause
  from datalad.ui import ui
label_desc: Use image node_id 2 for calling the SpecialRemote obj's underlying member method code with example usage: obj.message(msg, type) without return types