code: def get_soft_target_model_updates(target, source, tau):
      target_weights = target.trainable_weights + sum(
          [l.non_trainable_weights for l in target.layers], []
      )
      source_weights = source.trainable_weights + sum(
          [l.non_trainable_weights for l in source.layers], []
      )
      assert len(target_weights) == len(source_weights)
  
      # Create updates.
      updates = []
      for tw, sw in zip(target_weights, source_weights):
          updates.append((tw, tau * sw + (1.0 - tau) * tw))
      return updates
  
imports: import numpy
  from keras.models import model_from_config, Sequential, Model, model_from_config
  import keras.optimizers
  import keras.backend
label_desc: Use image node_id 3 for calling a global function with example usage: get_soft_target_model_updates(target, source, tau) and returns: updates