docstr: Set the final value of model's trainable variables.
  
  Sometimes there are some extra steps before ending the variable updates,
  such as overriding the model variables with its average value.
  
  Args:
    var_list: list of model variables.
docstr_tok: ["Set","the","final","value","of","model","'s","trainable","variables",".","Sometimes","there","are","some","extra","steps","before","ending","the","variable","updates",",","such","as","overriding","the","model","variables","with","its","average","value",".","Args",":","var_list",":","list","of","model","variables","."]
code: def finalize_variable_values(self, var_list):
      """Set the final value of model's trainable variables.
  
      Sometimes there are some extra steps before ending the variable updates,
      such as overriding the model variables with its average value.
  
      Args:
        var_list: list of model variables.
      """
      if self.use_ema:
          # If the optimizer uses EMA, then when finalizing, we replace the
          # model variable value with its moving average stored inside
          # optimizer.
          self._overwrite_model_variables_with_average_value(var_list)
  
imports: import re
  import warnings
  import numpy
  from keras import backend
  from keras import initializers
  from keras import ops
  from keras.optimizers.schedules import learning_rate_schedule
  from keras.saving import serialization_lib
  from keras.utils import tracking
  from keras.utils.naming import auto_name
label_desc: Use image node_id 36 for calling the BaseOptimizer obj's underlying member method code with example usage: obj.finalize_variable_values(var_list) without return types