code: def _download_competition_or_dataset(
      competition_or_dataset: str, output_dir: str
  ) -> None:
      """Downloads the data and extracts it if it was zipped by the kaggle api.
  
      Args:
        competition_or_dataset: Name of the kaggle competition/dataset.
        output_dir: Path to the dir where the data is to be downloaded.
      """
      _run_command(
          [
              "kaggle",
              _get_kaggle_type(competition_or_dataset),
              "download",
              "--path",
              output_dir,
              competition_or_dataset,
          ]
      )
      for download in tf.io.gfile.listdir(output_dir):
          fpath = os.path.join(output_dir, download)
          if zipfile.is_zipfile(fpath):
              ext = extractor.get_extractor()
              with ext.tqdm():
                  ext.extract(
                      fpath, resource.ExtractMethod.ZIP, output_dir
                  ).get()
  
file_path: datasets/tensorflow_datasets/core/download/kaggle.py
imports: import os
  import subprocess
  import textwrap
  from typing import List
  import zipfile
  from absl import logging
  from etils import epath
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.download import extractor
  from tensorflow_datasets.core.download import resource
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: _download_competition_or_dataset(competition_or_dataset, output_dir) without return types