code: def generator_fn_specgram(inputs, **kwargs):
      """Builds generator network."""
      # inputs = (noises, one_hot_labels)
      with tf.variable_scope("generator_cond"):
          z = tf.concat(inputs, axis=1)
      if kwargs["to_rgb_activation"] == "tanh":
          to_rgb_activation = tf.tanh
      elif kwargs["to_rgb_activation"] == "linear":
          to_rgb_activation = lambda x: x
      fake_images, end_points = networks.generator(
          z,
          kwargs["progress"],
          lambda block_id: _num_filters_fn(
              block_id, **kwargs
          ),  # pylint:disable=unnecessary-lambda
          kwargs["resolution_schedule"],
          num_blocks=kwargs["num_blocks"],
          kernel_size=kwargs["kernel_size"],
          colors=2,
          to_rgb_activation=to_rgb_activation,
          simple_arch=kwargs["simple_arch"],
      )
      shape = fake_images.shape
      normalizer = data_normalizer.registry[kwargs["data_normalizer"]](
          kwargs
      )
      fake_images = normalizer.denormalize_op(fake_images)
      fake_images.set_shape(shape)
      return fake_images, end_points
  
file_path: magenta/magenta/models/gansynth/lib/network_functions.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from magenta.models.gansynth.lib import data_normalizer
  from magenta.models.gansynth.lib import layers
  from magenta.models.gansynth.lib import networks
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: generator_fn_specgram(inputs) and returns: fake_images,  end_points