docstr: Test streamlitfile_util.streamlit_write.
docstr_tok: ["Test","streamlitfile_util.streamlit_write","."]
code: def test_streamlit_write(self):
      """Test streamlitfile_util.streamlit_write."""
  
      dirname = os.path.dirname(
          file_util.get_streamlit_file_path(FILENAME)
      )
      # patch streamlit.*.os.makedirs instead of os.makedirs for py35 compat
      with patch(
          "streamlit.file_util.open", mock_open()
      ) as open, patch(
          "streamlit.util.os.makedirs"
      ) as makedirs, file_util.streamlit_write(
          FILENAME
      ) as output:
          output.write("some data")
          open().write.assert_called_once_with("some data")
          makedirs.assert_called_once_with(dirname, exist_ok=True)
  
imports: import errno
  import os
  import unittest
  from unittest.mock import MagicMock, mock_open, patch
  import pytest
  from streamlit import file_util, util
label_desc: Use image node_id 6 for calling the FileUtilTest obj's underlying member method code with example usage: obj.test_streamlit_write() without return types