code: def test_pipe_close_blocked_write(self):
      timeout = 1.0
      pipe = Pipe()
      pipe.write("abcdefg")
  
      thread = in_thread(pipe.write, ("hijklmn",))
      thread.join(timeout)
      self.assertEqual(True, thread.is_alive())
  
      pipe.close()
      with self.assertRaises(RuntimeError):
          pipe.write("opqrstu")
      thread.join(timeout)
      self.assertEqual(False, thread.is_alive())
  
file_path: horovod/test/single/test_util.py
imports: import unittest
  from horovod.runner.util.streams import Pipe
  from horovod.runner.util.threads import in_thread
label_desc: Use image node_id 6 for calling the UtilTests obj's underlying member method code with example usage: obj.test_pipe_close_blocked_write() without return types