code: def _io_to_str(data_io, writer, **kwargs):
      # Some pandas writers try to close the IO, we do not want that.
      data_io_close = data_io.close
      data_io.close = lambda: None
      # Write data content.
      writer(data_io, **kwargs)
      data_value = data_io.getvalue()
      data_io_close()
      return data_value
  
imports: import io
  import ntpath
  import base64
label_desc: Use image node_id 4 for calling a global function with example usage: _io_to_str(data_io, writer) and returns: data_value