code: def test_close(self):
      shell = MockShell()
      f = PseudoOutputFile(shell, "stdout", "utf-8")
      self.assertFalse(f.closed)
      f.write("test")
      f.close()
      self.assertTrue(f.closed)
      self.assertRaises(ValueError, f.write, "x")
      self.assertEqual(shell.written, [("test", "stdout")])
      f.close()
      self.assertRaises(TypeError, f.close, 1)
  
imports: import unittest
  import io
  from idlelib.PyShell import PseudoInputFile, PseudoOutputFile
  from test import test_support
label_desc: Use image node_id 5 for calling the PseudeOutputFilesTest obj's underlying member method code with example usage: obj.test_close() without return types