code: def get_dataset(self, dataset):
          success = True
          dataset_path = self.base_dataset_path + dataset
          if not isdir(dataset_path):
              was_error = False
              for iteration in range(5):
                  if iteration == 0 or was_error is True:
                      zip_path = dataset_path + ".zip"
                      if not isfile(zip_path):
                          try:
                              with DLProgress(unit='B', unit_scale=True, miniters=1, desc=dataset) as pbar:
                                  urlretrieve(self.datasets[dataset]["url"], zip_path, pbar.hook)
                          except Exception as ex:
                              print("Error downloading %s: %s" % (dataset, ex))
                              was_error = True
                      if not isdir(dataset_path):
                          try:
                              with zipfile.ZipFile(zip_path) as zip_archive:
                                  zip_archive.extractall(path=dataset_path)
                                  zip_archive.close()
                          except Exception as ex:
                              print("Error unzipping %s: %s" % (zip_path, ex))
                              try:
                                  remove(zip_path)
                              except FileNotFoundError:
                                  pass
                              was_error = True
              if was_error:
                  print("\nThis recognizer is trained by the CASIA handwriting database.")
                  print("If the download doesn't work, you can get the files at %s" % self.datasets[dataset]["url"])
                  print("If you have download problems, "
                        "wget may be effective at downloading because of download resuming.")
                  success = False
          return success