code: def delete_checkpoint(self, checkpoint_dir):
          
          if os.path.isfile(checkpoint_dir):
              shutil.rmtree(os.path.dirname(checkpoint_dir))
          else:
              shutil.rmtree(checkpoint_dir)
docs: Removes subdirectory within checkpoint_folder
          Parameters
          ----------
              checkpoint_dir : path to checkpoint