code: def add_generator_smoothing_ops(
      generator_ema, gan_model, gan_train_ops
  ):
      """Adds generator smoothing ops."""
      with tf.control_dependencies([gan_train_ops.generator_train_op]):
          new_generator_train_op = generator_ema.apply(
              gan_model.generator_variables
          )
  
      gan_train_ops = gan_train_ops._replace(
          generator_train_op=new_generator_train_op
      )
      generator_vars_to_restore = generator_ema.variables_to_restore(
          gan_model.generator_variables
      )
      return gan_train_ops, generator_vars_to_restore
  
imports: import os
  import time
  from absl import logging
  from magenta.models.gansynth.lib import networks
  import numpy
  import tensorflow.compat.v1
  import tensorflow_gan
label_desc: Use image node_id 11 for calling a global function with example usage: add_generator_smoothing_ops(generator_ema, gan_model, gan_train_ops) and returns: gan_train_ops,  generator_vars_to_restore