def METHOD_NAME(self):
    with self.assertRaises(StreamlitAPIException) as e:
        st.text_input("the label", label_visibility="wrong_value")
    self.assertEqual(
        str(e.exception),
        "Unsupported label_visibility option 'wrong_value'. Valid values are "
        "'visible', 'hidden' or 'collapsed'.",
    )