code: def _ensure_folder_path(self, filebase_path):
          
          folders = filebase_path.split('/')
          parent = {"id": "root"}
          for folder in folders:
              file_list = self.drive.ListFile(
                  {'q': "'{}' in parents and trashed=false and title = '{}'".format(
                      parent['id'], folder)}).GetList()
              if not len(file_list):
                  f = self.drive.CreateFile({'title': folder, 'parents': [parent],
                                             'mimeType': 'application/vnd.google-apps.folder'})
                  f.Upload()
              else:
                  parent = {"id": file_list[-1]["id"]}
          return parent
docs: Creates the directory for the path given, recursively creating
          parent directories when needed