code: def download_json_file(
      url: str,
      session: requests.Session = None,
      request_kwargs: Optional[Dict] = None,
  ) -> Dict:
      """Downloads a json file from the provided read-url.
  
      Args:
          url:
              Url of the file to download.
          session:
              Session object to persist certain parameters across requests.
          request_kwargs:
              Additional parameters passed to requests.get().
  
      Returns the content of the json file as dictionary. Raises HTTPError in case
      of an error.
  
      """
      request_kwargs = request_kwargs or {}
      request_kwargs.setdefault("stream", True)
      request_kwargs.setdefault("timeout", 10)
      req = requests if session is None else session
  
      response = req.get(url, **request_kwargs)
      response.raise_for_status()
  
      return response.json()
  
file_path: lightly/lightly/api/download.py
imports: import concurrent.futures
  import os
  import pathlib
  import shutil
  import threading
  import warnings
  from concurrent.futures import ThreadPoolExecutor
  from typing import Callable, Dict, Iterable, List, Optional, Tuple, Type, Union
  import PIL
  import requests
  import tqdm
  from lightly.api import utils
label_desc: Use image node_id 6 for calling a global function with example usage: download_json_file(url, session, request_kwargs) and returns: response