code: def basic_rnn_hparams():
      """Generates the hparams used to train a basic_rnn.
  
      These are the hparams used in the .mag file found at
      https://github.com/magenta/magenta/tree/main/magenta/models/
      melody_rnn#pre-trained
  
      Returns:
        Hyperparameters of the downloadable basic_rnn pre-trained model.
      """
      # TODO(natashajaques): ability to restore basic_rnn from any .mag file.
      return contrib_training.HParams(
          batch_size=128,
          rnn_layer_sizes=[512, 512],
          one_hot_length=NUM_CLASSES,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import random
  from magenta.contrib import training
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: basic_rnn_hparams() and returns: contrib_training