class_docstr: Channel is a higher level abstraction over a low-level bytestream.
  
  You can send and receive JSON serializable object directly with this interface
  
  For now this class does not do much, but we could imagine some sort compression or other
  transformation being added here
code: def send(self, obj):
      try:
          to_send = json.dumps(
              obj, ensure_ascii=False, separators=(",", ":")
          ).encode("utf-8")
          sz = len(to_send)
          self._stream.write(self._fmt.pack(sz))
          self._stream.write(to_send)
      except EOFError as e:
          raise RuntimeError(
              "Cannot send object over streaming interface: %s" % e
          )
      except BaseException as e:
          raise ValueError(
              "Cannot serialize object: %s" % traceback.format_exc()
          )
  
file_path: metaflow/metaflow/plugins/env_escape/communication/channel.py
imports: import json
  import struct
  import traceback
label_desc: Use image node_id 2 for calling the Channel obj's underlying member method code with example usage: obj.send(obj) without return types