code: def test_validate_not_ok(self):
      bad_status_codes = (400, 404, 500)
      for bad_status_code in bad_status_codes:
          response = self.get_response(status_code=bad_status_code)
          self.assertRaises(
              PlotlyRequestError, utils.validate_response, response
          )
  
imports: from __future__ import absolute_import
  import json
  from requests.exceptions import ConnectionError
  from plotly import version
  from chart_studio.api.utils import to_native_utf8_string
  from chart_studio.api.v2 import utils
  from chart_studio.exceptions import PlotlyRequestError
  from chart_studio.session import sign_in
  from chart_studio.tests.test_plot_ly.test_api import PlotlyApiTestCase
label_desc: Use image node_id 2 for calling the ValidateResponseTest obj's underlying member method code with example usage: obj.test_validate_not_ok() without return types