code: def load_model(model_dir):
      """Loads model for inference mode, used in jupyter notebook."""
      model_params = sketch_rnn_model.get_default_hparams()
      with tf.gfile.Open(
          os.path.join(model_dir, "model_config.json"), "r"
      ) as f:
          model_params.parse_json(f.read())
  
      model_params.batch_size = 1  # only sample one at a time
      eval_model_params = sketch_rnn_model.copy_hparams(model_params)
      eval_model_params.use_input_dropout = 0
      eval_model_params.use_recurrent_dropout = 0
      eval_model_params.use_output_dropout = 0
      eval_model_params.is_training = 0
      sample_model_params = sketch_rnn_model.copy_hparams(
          eval_model_params
      )
      sample_model_params.max_seq_len = 1  # sample one point at a time
      return [model_params, eval_model_params, sample_model_params]
  
imports: import json
  import os
  import time
  import zipfile
  from magenta.models.sketch_rnn import model
  from magenta.models.sketch_rnn import utils
  import numpy
  import requests
  import six
  from six.moves.urllib.request import urlretrieve
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling a global function with example usage: load_model(model_dir) and returns: list