docstr: Test loading weights with unsupported extension.
docstr_tok: ["Test","loading","weights","with","unsupported","extension","."]
code: def test_load_weights_invalid_extension(self):
      """Test loading weights with unsupported extension."""
      model = self.get_model()
      with self.assertRaisesRegex(
          ValueError, "File format not supported"
      ):
          model.load_weights("invalid_extension.pkl")
  
imports: import os
  import unittest.mock
  import numpy
  from absl import logging
  from keras import layers
  from keras.models import Sequential
  from keras.saving import saving_api
  from keras.testing import test_case
label_desc: Use image node_id 4 for calling the LoadWeightsTests obj's underlying member method code with example usage: obj.test_load_weights_invalid_extension() without return types