docstr: st.pyplot should set image width.
docstr_tok: ["st.pyplot","should","set","image","width","."]
code: def test_st_pyplot_use_container_width(
      self, use_container_width: bool, image_width: int
  ):
      """st.pyplot should set image width."""
      fig = plt.figure()
      ax1 = fig.add_subplot(111)
      ax1.hist(np.random.normal(1, 1, size=100), bins=20)
  
      st.pyplot(fig, use_container_width=use_container_width)
  
      el = self.get_delta_from_queue().new_element
      self.assertEqual(el.imgs.width, image_width)
  
file_path: streamlit/lib/tests/streamlit/elements/pyplot_test.py
imports: from typing import Optional
  from unittest.mock import patch
  import matplotlib
  import matplotlib.pyplot
  import numpy
  from parameterized import parameterized
  import streamlit
  from streamlit.elements import image
  from streamlit.web.server.server import MEDIA_ENDPOINT
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 6 for calling the PyplotTest obj's underlying member method code with example usage: obj.test_st_pyplot_use_container_width(use_container_width, image_width) without return types