code: def test_enable_lora(self):
      layer = layers.Embedding(10, 16)
      layer.build()
      layer.enable_lora(4)
      self.assertLen(layer.trainable_weights, 2)
      self.assertLen(layer.non_trainable_weights, 1)
      # Try eager call
      x = np.random.randint(0, 9, size=(64, 3))
      y = np.random.random((64, 3, 16))
      _ = layer(x[:2])
  
      # Try calling fit()
      model = models.Sequential(
          [
              layer,
          ]
      )
      model.compile(optimizer="sgd", loss="mse")
      model.fit(x, y)
  
      # Try saving and reloading the model
      temp_filepath = os.path.join(
          self.get_temp_dir(), "lora_model.keras"
      )
      model.save(temp_filepath)
  
      new_model = saving.load_model(temp_filepath)
      self.assertFalse(new_model.layers[0].lora_enabled)
      self.assertAllClose(model.predict(x), new_model.predict(x))
  
      # Try saving and reloading the model's weights only
      temp_filepath = os.path.join(
          self.get_temp_dir(), "lora_model.weights.h5"
      )
      model.save_weights(temp_filepath)
  
      # Load the file into a fresh, non-lora model
      new_model = models.Sequential(
          [
              layers.Input((3,), dtype="int32"),
              layers.Embedding(10, 16),
          ]
      )
      new_model.load_weights(temp_filepath)
      self.assertAllClose(model.predict(x), new_model.predict(x))
  
      # Try loading a normal checkpoint into a lora model
      new_model.save_weights(temp_filepath)
      model.load_weights(temp_filepath)
      self.assertAllClose(model.predict(x), new_model.predict(x))
  
file_path: keras/keras/layers/core/embedding_test.py
imports: import os
  import numpy
  import pytest
  from keras import backend
  from keras import constraints
  from keras import layers
  from keras import models
  from keras import saving
  from keras.testing import test_case
label_desc: Use image node_id 8 for calling the EmbeddingTest obj's underlying member method code with example usage: obj.test_enable_lora() without return types