code: def test_codestr2rst():
      """Test the correct translation of a code block into rst"""
      output = sg.codestr2rst('print("hello world")')
      reference = """
  .. code-block:: python
  
      print("hello world")"""
      assert reference == output
  
imports: from __future__ import division, absolute_import, print_function, unicode_literals
  import ast
  import codecs
  import copy
  import logging
  import tempfile
  import re
  import os
  import shutil
  import zipfile
  import pytest
  import sphinx_gallery.gen_rst
  from sphinx_gallery import gen_gallery, downloads
  from sphinx_gallery.gen_gallery import generate_dir_rst
  from sphinx_gallery import sphinx_compatibility
  import matplotlib.pyplot
label_desc: Use image node_id 4 for calling a global function with example usage: test_codestr2rst() without return types