code: def prepare_data(data_name):
      """Prepare datasets.
      Args:
          data_path: the path to save the data
          data_name: the name of dataset, "ptb" and "yahoo"
              are currently supported
      """
      if data_name == "ptb":
          data_path = "./simple-examples/data"
          train_path = os.path.join(data_path, "ptb.train.txt")
          if not tf.gfile.Exists(train_path):
              url = "http://www.fit.vutbr.cz/~imikolov/rnnlm/simple-examples.tgz"
              tx.data.maybe_download(url, "./", extract=True)
  
          train_path = os.path.join(data_path, "ptb.train.txt")
          vocab_path = os.path.join(data_path, "vocab.txt")
          word_to_id = tx.data.make_vocab(
              train_path, return_type="dict"
          )
  
          with open(vocab_path, "w") as fvocab:
              for word in word_to_id:
                  fvocab.write("%s\n" % word)
  
      elif data_name == "yahoo":
          data_path = "./data/yahoo"
          train_path = os.path.join(data_path, "yahoo.train.txt")
          if not tf.gfile.Exists(train_path):
              url = (
                  "https://drive.google.com/file/d/"
                  "13IsiffVjcQ-wrrbBGMwiG3sYf-DFxtXH/view?usp=sharing"
              )
              tx.data.maybe_download(
                  url, path="./", filenames="yahoo.zip", extract=True
              )
      else:
          raise ValueError("Unknown data: {}".format(data_name))
  
imports: import os
  import argparse
  import tensorflow
  import texar.tf
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_data(data_name) without return types