code: def define_train_ops(gan_model, gan_loss, **kwargs):
      """Defines progressive GAN train ops.
  
      Args:
        gan_model: A `GANModel` namedtuple.
        gan_loss: A `GANLoss` namedtuple.
        **kwargs: A dictionary of
            'adam_beta1': A float of Adam optimizer beta1.
            'adam_beta2': A float of Adam optimizer beta2.
            'generator_learning_rate': A float of generator learning rate.
            'discriminator_learning_rate': A float of discriminator learning rate.
  
      Returns:
        A tuple of `GANTrainOps` namedtuple and a list variables tracking the state
        of optimizers.
      """
      with tf.variable_scope("progressive_gan_train_ops") as var_scope:
          beta1, beta2 = kwargs["adam_beta1"], kwargs["adam_beta2"]
          gen_opt = tf.train.AdamOptimizer(
              kwargs["generator_learning_rate"], beta1, beta2
          )
          dis_opt = tf.train.AdamOptimizer(
              kwargs["discriminator_learning_rate"], beta1, beta2
          )
          gan_train_ops = tfgan.gan_train_ops(
              gan_model, gan_loss, gen_opt, dis_opt
          )
      return gan_train_ops, tf.get_collection(
          tf.GraphKeys.GLOBAL_VARIABLES, scope=var_scope.name
      )
  
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 10 for calling a global function with example usage: define_train_ops(gan_model, gan_loss) and returns: gan_train_ops,  tf