code: def get_icdar_2019_semisupervised_dataset(cache_dir=None):
      """EXPERIMENTAL. Get a semisupervised labeled version
      of the ICDAR 2019 dataset. Only images with Latin-only
      scripts are available at this time.
  
      Args:
          cache_dir: The cache directory to use.
      """
      warnings.warn(
          "You may need to get this dataset manually in-browser by downloading "
          "https://www.mediafire.com/file/snekaezeextc3ee/ImagesPart1.zip/file "
          "and https://www.mediafire.com/file/i2snljkfm4t2ojm/ImagesPart2.zip/file "
          "and putting them in ~/.keras-ocr/icdar2019. The files are too big "
          "for GitHub Releases and we may run out of direct download  bandwidth on "
          "MediaFire where they are hosted. See "
          "https://github.com/faustomorales/keras-ocr/issues/117 for more details.",
          UserWarning,
      )
      if cache_dir is None:
          cache_dir = tools.get_default_cache_dir()
      main_dir = os.path.join(cache_dir, "icdar2019")
      training_dir_1 = os.path.join(main_dir, "ImagesPart1")
      training_dir_2 = os.path.join(main_dir, "ImagesPart2")
      if len(glob.glob(os.path.join(training_dir_1, "*"))) != 5000:
          training_zip_1 = tools.download_and_verify(
              url="https://www.mediafire.com/file/snekaezeextc3ee/ImagesPart1.zip/file",  # pylint: disable=line-too-long
              cache_dir=main_dir,
              filename="ImagesPart1.zip",
              sha256="1968894ef93b97f3ef4c97880b6dce85b1851f4d778e253f4e7265b152a4986f",
          )
          with zipfile.ZipFile(training_zip_1) as zfile:
              zfile.extractall(main_dir)
      if len(glob.glob(os.path.join(training_dir_2, "*"))) != 5000:
          training_zip_2 = tools.download_and_verify(
              url="https://www.mediafire.com/file/i2snljkfm4t2ojm/ImagesPart2.zip/file",  # pylint: disable=line-too-long
              cache_dir=main_dir,
              filename="ImagesPart2.zip",
              sha256="5651b9137e877f731bfebb2a8b75042e26baa389d2fb1cfdbb9e3da343757241",
          )
          with zipfile.ZipFile(training_zip_2) as zfile:
              zfile.extractall(main_dir)
      ground_truth = tools.download_and_verify(
          url="https://github.com/faustomorales/keras-ocr/releases/download/v0.8.4/mlt2019_dataset.json",  # pylint: disable=line-too-long
          cache_dir=main_dir,
          filename="mlt2019_dataset.json",
      )
      with open(ground_truth, "r", encoding="utf8") as f:
          character_level_dataset = json.loads(f.read())["dataset"]
      for gif_filepath in glob.glob(
          os.path.join(main_dir, "**", "*.gif")
      ):
          # We need to do this because we cannot easily read GIFs.
          PIL.Image.open(gif_filepath).convert("RGB").save(
              os.path.splitext(gif_filepath)[0] + ".jpg"
          )
          os.remove(gif_filepath)
      return [
          (
              os.path.join(main_dir, entry["filepath"]),
              [
                  [
                      (np.array(box).clip(0, np.inf), None)
                      for box in line["line"]
                  ]
                  for line in entry["lines"]
                  if line["line"]
              ],
              entry["percent_complete"],
          )
          for entry in character_level_dataset
          if entry["percent_complete"] > 0.5
      ]
  
imports: import concurrent.futures
  import itertools
  import warnings
  import typing
  import zipfile
  import random
  import glob
  import json
  import os
  import tqdm
  import imgaug
  import PIL.Image
  import numpy
  from .None import tools
label_desc: Use image node_id 6 for calling a global function with example usage: get_icdar_2019_semisupervised_dataset(cache_dir) and returns: unknown