class_docstr: Defines the SVGDecoder model.
code: def lstm_decoder(
      self,
      inputs,
      sequence_length,
      hparams,
      clss,
      train,
      initial_state=None,
      bottleneck=None,
  ):
      # NOT IN PREDICT MODE. JUST RUN TEACHER-FORCED RNN:
      layers = rnn.MultiRNNCell(
          [
              self.lstm_cell(hparams, train)
              for _ in range(hparams.num_hidden_layers)
          ]
      )
  
      # append one-hot class to bottleneck, which will be given per step
      clss = tf.reshape(clss, [-1])
      if not hparams.use_cls:
          clss = tf.zeros_like(clss)
      if hparams.condition_on_sln:
          sln = tf.reshape(sequence_length, [-1])
          bottleneck = tf.concat(
              (
                  bottleneck,
                  tf.one_hot(clss, hparams.num_categories),
                  tf.one_hot(sln, 51),
              ),
              -1,
          )
      else:
          bottleneck = tf.concat(
              (bottleneck, tf.one_hot(clss, hparams.num_categories)), -1
          )
  
      # tile and append the bottleneck to inputs
      sln_offset = 0
      if hparams.condition_on_sln:
          sln_offset = 51
      pre_tile_y = tf.reshape(
          bottleneck,
          [
              common_layers.shape_list(bottleneck)[0],
              1,
              hparams.bottleneck_bits
              + hparams.num_categories
              + sln_offset,
          ],
      )
      overlay_x = tf.tile(
          pre_tile_y, [1, common_layers.shape_list(inputs)[1], 1]
      )
      inputs = tf.concat([inputs, overlay_x], -1)
  
      with tf.variable_scope("pre_decoder", reuse=tf.AUTO_REUSE):
          inputs = tf.layers.dense(
              inputs, hparams.hidden_size, name="bottom"
          )
          inputs = tf.nn.tanh(inputs)
  
      with tf.variable_scope("lstm_decoder", reuse=tf.AUTO_REUSE):
          return tf.nn.dynamic_rnn(
              layers,
              inputs,
              sequence_length,
              initial_state=initial_state,
              dtype=tf.float32,
              time_major=False,
          )
  
imports: import copy
  from magenta.contrib import rnn
  from magenta.models.svg_vae import image_vae
  from magenta.models.svg_vae import svg_decoder_loss
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  from tensor2tensor.utils import trainer_lib
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 5 for calling the SVGDecoder obj's underlying member method code with example usage: obj.lstm_decoder(inputs, sequence_length, hparams, clss, train, initial_state, bottleneck) and returns: tf