code: def test_plot_errors_show_triggered_automatically(self):
      x_train, x_test, y_train, y_test = simple_classification()
  
      optimizer = algorithms.Adadelta(
          self.network,
          shuffle_data=True,
          batch_size=10,
      )
      optimizer.train(x_train, y_train, epochs=100)
      events = []
  
      def mocked_show(*args, **kwargs):
          events.append("show")
  
      with mock.patch(
          "matplotlib.pyplot.show", side_effect=mocked_show
      ):
          optimizer.plot_errors(show=True)
          self.assertSequenceEqual(events, ["show"])
  
      return plt.gcf()
  
file_path: neupy/tests/algorithms/test_plots.py
imports: import warnings
  import mock
  import pytest
  import matplotlib.pyplot
  from neupy import algorithms, layers
  from neupy.algorithms.plots import load_pandas_module
  from helpers import simple_classification
  from base import BaseTestCase
label_desc: Use image node_id 6 for calling the PlotsTestCase obj's underlying member method code with example usage: obj.test_plot_errors_show_triggered_automatically() and returns: plt