code: def test_direct_comment_after_docstring():
      # For more details see
      # https://github.com/sphinx-gallery/sphinx-gallery/pull/49
      with tempfile.NamedTemporaryFile("w", delete=False) as f:
          f.write(
              "\n".join(
                  [
                      '"Docstring"',
                      "# and now comes the module code",
                      "# with a second line of comment",
                      "x, y = 1, 2",
                      "",
                  ]
              )
          )
      try:
          file_conf, result = sg.split_code_and_text_blocks(f.name)
      finally:
          os.remove(f.name)
  
      assert file_conf == {}
      expected_result = [
          ("text", "Docstring", 1),
          (
              "code",
              "\n".join(
                  [
                      "# and now comes the module code",
                      "# with a second line of comment",
                      "x, y = 1, 2",
                      "",
                  ]
              ),
              2,
          ),
      ]
      assert result == expected_result
  
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 3 for calling a global function with example usage: test_direct_comment_after_docstring() without return types