code: def get_dataset(self, dataset):
          
          # If the dataset is present, no need to download anything.
          success = True
          dataset_path = self.base_dataset_path + dataset
          if not isdir(dataset_path):
  
              # Try 5 times to download. The download page is unreliable, so we need a few tries.
              was_error = False
              for iteration in range(5):
  
                  # Guard against trying again if successful
                  if iteration == 0 or was_error is True:
                      zip_path = dataset_path + ".zip"
  
                      # Download zip files if they're not there
                      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
  
                      # Unzip the data files
                      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))
                              # Usually the error is caused by a bad zip file.
                              # Delete it so the program will try to download it again.
                              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
docs: Checks to see if the dataset is present. If not, it downloads and unzips it.