code: def encode_base64(msg):
      """Encode the message's payload in Base64.
  
      Also, add an appropriate Content-Transfer-Encoding header.
      """
      orig = msg.get_payload(decode=True)
      encdata = str(_bencode(orig), "ascii")
      msg.set_payload(encdata)
      msg["Content-Transfer-Encoding"] = "base64"
  
imports: from base64 import encodebytes
  from quopri import encodestring
label_desc: Use image node_id 2 for calling a global function with example usage: encode_base64(msg) without return types