# Path: telluride_decoding/plot_util.py
# def matplotlib_pyplot():
# def plot_mean_std(test_name,
#                   regularization_list,
#                   run_mean,
#                   run_std,
#                   golden_mean_std_dict=None,
#                   png_file_name=None,
#                   show_plot=False):


from absl.testing import absltest
from telluride_decoding import plot_util
import mock
import tensorflow.compat.v2 as tf
        test_name,
        regularization_list,
        run_mean,
        run_std,
        png_file_name='test.png')

    mock_plt = mock_pyplot.return_value
    mock_plt.figure.assert_called_once_with()
    mock_plt.errorbar.assert_called_once_with(
        regularization_list, run_mean, run_std, color='blue', label='actual')
    mock_plt.xscale.assert_called_once_with('log')
    mock_plt.xlabel.assert_called_once_with('Regularization lambda (log10)')
    mock_plt.ylabel.assert_called_once_with('Mean correlation')
    mock_plt.title.assert_called_once_with('test experiment correlation')
    mock_gfile.assert_called_once_with('test.png', 'wb')
    mock_plt.savefig.assert_called_once_with(
        mock_gfile.return_value.__enter__.return_value, format='png')

  @mock.patch.object(plot_util, 'matplotlib_pyplot')
  @mock.patch.object(tf.io.gfile, 'GFile')
  def test_plot_mean_std_save_png_with_golden_mean_std(self, mock_gfile,
                                                       mock_pyplot):
    test_name = 'test'
    regularization_list = [1e-6, 1e-3, 1]
    run_mean = [0.5, 0.6, 0.7]
    run_std = [0.1, 0.2, 0.3]
    golden_mean_std_dict = {1e-6: (1.2, 2.3, 0.1, 0.1),
                            1e-3: (2.4, 3.5, 0.2, 0.2),
                            1: (3.7, 4.8, 0.3, 0.3)}


# Path: telluride_decoding/plot_util.py
# def matplotlib_pyplot():
# def plot_mean_std(test_name,
#                   regularization_list,
#                   run_mean,
#                   run_std,
#                   golden_mean_std_dict=None,
#                   png_file_name=None,
#                   show_plot=False):


# Path: test/plot_util_test.py
from absl.testing import absltest
from telluride_decoding import plot_util
import mock
import tensorflow.compat.v2 as tf

        test_name,
        regularization_list,
        run_mean,
        run_std,
        png_file_name='test.png')

    mock_plt = mock_pyplot.return_value
    mock_plt.figure.assert_called_once_with()
    mock_plt.errorbar.assert_called_once_with(
        regularization_list, run_mean, run_std, color='blue', label='actual')
    mock_plt.xscale.assert_called_once_with('log')
    mock_plt.xlabel.assert_called_once_with('Regularization lambda (log10)')
    mock_plt.ylabel.assert_called_once_with('Mean correlation')
    mock_plt.title.assert_called_once_with('test experiment correlation')
    mock_gfile.assert_called_once_with('test.png', 'wb')
    mock_plt.savefig.assert_called_once_with(
        mock_gfile.return_value.__enter__.return_value, format='png')

  @mock.patch.object(plot_util, 'matplotlib_pyplot')
  @mock.patch.object(tf.io.gfile, 'GFile')
  def test_plot_mean_std_save_png_with_golden_mean_std(self, mock_gfile,
                                                       mock_pyplot):
    test_name = 'test'
    regularization_list = [1e-6, 1e-3, 1]
    run_mean = [0.5, 0.6, 0.7]
    run_std = [0.1, 0.2, 0.3]
    golden_mean_std_dict = {1e-6: (1.2, 2.3, 0.1, 0.1),
                            1e-3: (2.4, 3.5, 0.2, 0.2),
                            1: (3.7, 4.8, 0.3, 0.3)}


    plot_util.plot_mean_std(