code: def download_kaggle_dataset(
      download_directory: str,
      kaggle_dataset_id: Optional[str] = None,
      kaggle_competition: Optional[str] = None,
      kaggle_username: Optional[str] = None,
      kaggle_key: Optional[str] = None,
  ):
      """Download all files in a kaggle dataset. One of kaggle_dataset_id,
  
      If the user has not specified creds in the kaggle.json file we lookup the passed in username and the api key and
      perform authentication.
      """
      with update_env(
          KAGGLE_USERNAME=kaggle_username, KAGGLE_KEY=kaggle_key
      ):
          # Call authenticate explicitly to pick up new credentials if necessary
          api = create_kaggle_client()
          api.authenticate()
      with upload_output_directory(download_directory) as (tmpdir, _):
          if kaggle_competition:
              api.competition_download_files(
                  kaggle_competition, path=tmpdir
              )
          else:
              api.dataset_download_files(kaggle_dataset_id, path=tmpdir)
      return [
          os.path.join(download_directory, f)
          for f in os.listdir(download_directory)
      ]
  
imports: import os
  from contextlib import contextmanager
  from typing import Optional
  from ludwig.utils.fs_utils import upload_output_directory
label_desc: Use image node_id 3 for calling a global function with example usage: download_kaggle_dataset(download_directory, kaggle_dataset_id, kaggle_competition, kaggle_username, kaggle_key) and returns: unknown