code: def test_backref_thumbnail_div():
      """Test if the thumbnail div generates the correct string"""
  
      html_div = sg._thumbnail_div(
          "fake_dir", "test_file.py", "test formating", is_backref=True
      )
  
      reference = """
  .. raw:: html
  
      <div class="sphx-glr-thumbcontainer" tooltip="test formating">
  
  .. only:: html
  
      .. figure:: /fake_dir/images/thumb/sphx_glr_test_file_thumb.png
  
          :ref:`sphx_glr_fake_dir_test_file.py`
  
  .. raw:: html
  
      </div>
  
  .. only:: not html
  
      * :ref:`sphx_glr_fake_dir_test_file.py`
  """
  
      assert html_div == reference
  
imports: from __future__ import division, absolute_import, print_function
  import os
  import sphinx_gallery.backreferences
label_desc: Use image node_id 2 for calling a global function with example usage: test_backref_thumbnail_div() without return types