code: def test_convert():
      """Test ReST conversion"""
      rst = """hello
  
  .. contents::
      :local:
  
  This is :math:`some` math :math:`stuff`.
  
  .. note::
      Interpolation is a linear operation that can be performed also on
      Raw and Epochs objects.
  
  .. warning::
      Go away
  
  For more details on interpolation see the page :ref:`channel_interpolation`.
  .. _foo: bar
  
  .. image:: foobar
    :alt: me
    :whatever: you
  """
  
      markdown = """hello
  
  This is $some$ math $stuff$.
  
  <div class="alert alert-info"><h4>Note</h4><p>Interpolation is a linear operation that can be performed also on
      Raw and Epochs objects.</p></div>
  
  <div class="alert alert-danger"><h4>Warning</h4><p>Go away</p></div>
  
  For more details on interpolation see the page `channel_interpolation`.
  
  ![me](foobar)
  """  # noqa
      assert rst2md(rst) == markdown
  
file_path: tensorly/doc/sphinx_ext/sphinx_gallery/tests/test_notebook.py
imports: from __future__ import division, absolute_import, print_function
  import json
  import tempfile
  import os
  import pytest
  import sphinx_gallery.gen_rst
  from sphinx_gallery.notebook import rst2md, jupyter_notebook, save_notebook, python_to_jupyter_cli
label_desc: Use image node_id 2 for calling a global function with example usage: test_convert() without return types