code: def multithread_download_photos(photos):
      
      from concurrent import futures
      global counter
      counter = len(photos)
      cpu_num = multiprocessing.cpu_count()
      with futures.ThreadPoolExecutor(max_workers=cpu_num) as executor:
          for photo in photos:
              executor.submit(download_photo, photo)
docs: Use multiple threads to download photos
  
      :param photos: The photos to be downloaded
      :type photos: list of dicts