code: def test_cli_writes_to_stdout(tmpdir, tmp_text_file):
      # ensure writing works with all python versions
      tmp_image_file = tmpdir.join("word_cloud.png")
  
      tmp_text_file.write(b"some text")
  
      with contextlib.redirect_stdout(tmp_image_file.open("w+")):
          args, text, image_file = cli.parse_args(
              ["--text", str(tmp_text_file)]
          )
          cli.main(args, text, image_file)
  
      # expecting image to be written to stdout
      assert tmp_image_file.size() > 0
  
imports: import argparse
  import os
  import subprocess
  import sys
  from collections import namedtuple
  import contextlib
  import wordcloud
  from wordcloud import wordcloud_cli
  from unittest.mock import patch
  import pytest
  import matplotlib
label_desc: Use image node_id 13 for calling a global function with example usage: test_cli_writes_to_stdout(tmpdir, tmp_text_file) without return types