code: def build_graph(
      is_training,
      hparams,
      placeholders=None,
      direct_inputs=None,
      use_placeholders=True,
  ):
      """Builds the model graph."""
      if placeholders is None and use_placeholders:
          placeholders = get_placeholders(hparams)
      initializer = tf.random_uniform_initializer(
          -hparams.init_scale, hparams.init_scale
      )
      with tf.variable_scope(
          "model", reuse=None, initializer=initializer
      ):
          graph = CoconetGraph(
              is_training=is_training,
              hparams=hparams,
              placeholders=placeholders,
              direct_inputs=direct_inputs,
              use_placeholders=use_placeholders,
          )
      return graph
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import os
  from magenta.models.coconet import lib_hparams
  from magenta.models.coconet import lib_tfutil
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: build_graph(is_training, hparams, placeholders, direct_inputs, use_placeholders) and returns: graph