code: def test_plot_examples():
      cfg = dict(use_plots=True)
  
      doc = SphinxDocString(
          """
      Examples
      --------
      >>> import matplotlib.pyplot as plt
      >>> plt.plot([1,2,3],[4,5,6])
      >>> plt.show()
      """,
          config=cfg,
      )
      assert "plot::" in str(doc), str(doc)
  
      doc = SphinxDocString(
          """
      Examples
      --------
      .. plot::
  
         import matplotlib.pyplot as plt
         plt.plot([1,2,3],[4,5,6])
         plt.show()
      """,
          config=cfg,
      )
      assert str(doc).count("plot::") == 1, str(doc)
  
imports: import sys, textwrap
  from numpydoc.docscrape import NumpyDocString, FunctionDoc, ClassDoc
  from numpydoc.docscrape_sphinx import SphinxDocString, SphinxClassDoc
  from nose.tools import *
label_desc: Use image node_id 24 for calling a global function with example usage: test_plot_examples() without return types