code: def test_sign_in_cannot_validate(self):
      self.users_current_mock.side_effect = (
          exceptions.PlotlyRequestError("msg", 400, "foobar")
      )
      with self.assertRaisesRegex(
          _plotly_utils.exceptions.PlotlyError, "Sign in failed"
      ):
          py.sign_in("foo", "bar")
  
file_path: plotly.py/packages/python/chart-studio/chart_studio/tests/test_plot_ly/test_plotly/test_credentials.py
imports: from __future__ import absolute_import
  import _plotly_utils.exceptions
  from chart_studio import plotly, exceptions
  import chart_studio.session
  import chart_studio.tools
  from chart_studio.tests.utils import PlotlyTestCase
  import sys
label_desc: Use image node_id 6 for calling the TestSignIn obj's underlying member method code with example usage: obj.test_sign_in_cannot_validate() without return types