code: def build(opt):
      dpath = os.path.join(opt["datapath"], "CNN_DM")
      version = None
  
      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.
          # Download the data.
          for downloadable_file in RESOURCES:
              downloadable_file.download_file(dpath)
  
          for i, f in enumerate(RESOURCES[2:5]):
              dt = data_type[i]
              urls_fname = os.path.join(dpath, f.file_name)
              split_fname = os.path.join(dpath, dt + ".txt")
              with PathManager.open(
                  urls_fname
              ) as urls_file, PathManager.open(
                  split_fname, "a"
              ) as split_file:
                  for url in urls_file:
                      file_name = hashlib.sha1(
                          url.strip().encode("utf-8")
                      ).hexdigest()
                      split_file.write(
                          "cnn/stories/{}.story\n".format(file_name)
                      )
  
          for i, f in enumerate(RESOURCES[5:]):
              dt = data_type[i]
              urls_fname = os.path.join(dpath, f.file_name)
              split_fname = os.path.join(dpath, dt + ".txt")
              with PathManager.open(
                  urls_fname
              ) as urls_file, PathManager.open(
                  split_fname, "a"
              ) as split_file:
                  for url in urls_file:
                      file_name = hashlib.sha1(
                          url.strip().encode("utf-8")
                      ).hexdigest()
                      split_file.write(
                          "dailymail/stories/{}.story\n".format(
                              file_name
                          )
                      )
  
          # Mark the data as built.
          build_data.mark_done(dpath, version_string=version)
  
imports: import parlai.core.build_data
  import os
  import hashlib
  from parlai.core.build_data import DownloadableFile
  from parlai.utils.io import PathManager
label_desc: Use image node_id 1 for calling a global function with example usage: build(opt) without return types