code: def _load_info(url=DATA_LIST_URL, encoding="utf-8"):
      """Load dataset information from the network.
  
      If the network access fails, fall back to a local cache.  This cache gets
      updated each time a network request _succeeds_.
      """
      cache_path = os.path.join(BASE_DIR, "information.json")
      _create_base_dir()
  
      try:
          info_bytes = urlopen(url).read()
      except (OSError, IOError):
          #
          # The exception raised by urlopen differs between Py2 and Py3.
          #
          # https://docs.python.org/3/library/urllib.error.html
          # https://docs.python.org/2/library/urllib.html
          #
          logger.exception(
              "caught non-fatal exception while trying to update gensim-data cache from %r; "
              "using local cache at %r instead",
              url,
              cache_path,
          )
      else:
          with open(cache_path, "wb") as fout:
              fout.write(info_bytes)
  
      try:
          #
          # We need io.open here because Py2 open doesn't support encoding keyword
          #
          with io.open(cache_path, "r", encoding=encoding) as fin:
              return json.load(fin)
      except IOError:
          raise ValueError(
              "unable to read local cache %r during fallback, "
              "connect to the Internet and retry" % cache_path
          )
  
imports: from __future__ import absolute_import
  import argparse
  import os
  import io
  import json
  import logging
  import sys
  import errno
  import hashlib
  import math
  import shutil
  import tempfile
  from functools import partial
label_desc: Use image node_id 4 for calling a global function with example usage: _load_info(url, encoding) and returns: json