title: TypeError: show() takes 1 positional argument but 2 were given
body: <p>The simple code below is giving the error in the title. The compiler is complaining that 2 positional arguments were given to plt.show(), but only one was expected. However as you can see from the code only one argument &quot;fig1&quot; was given?</p>
  <pre><code>def test_plot_episode_stats(stats):
      fig1 = plt.figure(figsize=(10, 5))
      plt.plot(stats.episode_lengths)
      plt.show(fig1)
      return fig1
  
  EpisodeStats = namedtuple(&quot;Stats&quot;, [&quot;episode_lengths&quot;, &quot;episode_rewards&quot;])
  </code></pre>
  <p>if <strong>name</strong> == '<strong>main</strong>':</p>
  <pre><code>stats = EpisodeStats(
      episode_lengths=np.random.randint(10, size=10),
      episode_rewards=np.random.randint(10, size=10))
  test_plot_episode_stats(stats)
  </code></pre>