class_docstr: OSS Filesystem Tests
code: def test_file_write_bad_mode(self):
      file_path = file_io.join(self._base_dir, "temp_file")
      with self.assertRaises(errors.PermissionDeniedError):
          gfile.Open(file_path, mode="r").write("testing")
  
imports: import os
  import unittest
  from tensorflow.python.framework import errors
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.platform import test
  from tensorflow.python.platform import gfile
  import tensorflow
  import tensorflow_io
label_desc: Use image node_id 13 for calling the OSSFSTest obj's underlying member method code with example usage: obj.test_file_write_bad_mode() without return types