code: def build(opt):
      dpath = os.path.join(opt["datapath"], "wmt")
      version = "1.0"
  
      if not build_data.built(dpath, version_string=version):
          print("[building data: " + dpath + "]")
          if build_data.built(dpath):
              # An older version exists, so remove these outdated files.
              build_data.remove_dir(dpath)
          build_data.make_dir(dpath)
  
          # Download the data.
          for downloadable_file in RESOURCES:
              downloadable_file.download_file(dpath)
  
          train_r_fnames = ("train.en", "train.de")
          train_w_fname = "en_de_train.txt"
          valid_w_fname = "en_de_valid.txt"
          test_r_fnames = ("newstest2014.en", "newstest2014.de")
          test_w_fname = "en_de_test.txt"
  
          train_zip = readFiles(dpath, train_r_fnames)
          numpy.random.RandomState(42).shuffle(train_zip)
          with PathManager.open(
              os.path.join(dpath, valid_w_fname), "w"
          ) as f:
              for de_sent, en_sent in train_zip[:30000]:
                  f.write("1 " + en_sent + "\t" + de_sent + "\n")
          with PathManager.open(
              os.path.join(dpath, train_w_fname), "w"
          ) as f:
              for de_sent, en_sent in train_zip[30000:]:
                  f.write("1 " + en_sent + "\t" + de_sent + "\n")
  
          test_zip = readFiles(dpath, test_r_fnames)
          with PathManager.open(
              os.path.join(dpath, test_w_fname), "w"
          ) as f:
              for de_sent, en_sent in test_zip:
                  f.write("1 " + en_sent + "\t" + de_sent + "\n")
  
          # Mark the data as built.
          build_data.mark_done(dpath, version_string=version)
  
imports: import parlai.core.build_data
  import os
  import numpy
  from parlai.core.build_data import DownloadableFile
  from parlai.utils.io import PathManager
label_desc: Use image node_id 2 for calling a global function with example usage: build(opt) without return types