code: def _check_reloading_weights(self, ref_input, model, tf_keras_model):
      ref_output = tf_keras_model(ref_input)
      initial_weights = model.get_weights()
      # Check weights only file
      temp_filepath = os.path.join(self.get_temp_dir(), "weights.h5")
      tf_keras_model.save_weights(temp_filepath)
      model.load_weights(temp_filepath)
      output = model(ref_input)
      self.assertAllClose(ref_output, output, atol=1e-5)
      model.set_weights(initial_weights)
      model.load_weights(temp_filepath)
      output = model(ref_input)
      self.assertAllClose(ref_output, output, atol=1e-5)
  
imports: import os
  import numpy
  import pytest
  import keras
  from keras import layers
  from keras import models
  from keras import ops
  from keras import testing
  from keras.legacy.saving import legacy_h5_format
  from keras.saving import object_registration
  from keras.saving import serialization_lib
label_desc: Use image node_id 1 for calling the LegacyH5WeightsTest obj's underlying member method code with example usage: obj._check_reloading_weights(ref_input, model, tf_keras_model) without return types