code: def send_bytes(src, filename, type=None, **kwargs):
      """
      Convert data written to BytesIO into the format expected by the Download component.
      :param src: array of bytes or a writer that can write to BytesIO
      :param filename: the name of the file
      :param type: type of the file (optional, passed to Blob in the javascript layer)
      :return: dict of data frame content (base64 encoded) and meta data used by the Download component
      """
      content = (
          src
          if isinstance(src, bytes)
          else _io_to_str(io.BytesIO(), src, **kwargs)
      )
      return dict(
          content=base64.b64encode(content).decode(),
          filename=filename,
          type=type,
          base64=True,
      )
  
imports: import io
  import ntpath
  import base64
label_desc: Use image node_id 2 for calling a global function with example usage: send_bytes(src, filename, type) and returns: dict