code: def download(
      example_ids, download_if_already_existing=False, verbose=True
  ):
      """
      Downloads standard NiftyNet examples such as data, samples
  
      :param example_ids:
          A list of identifiers for the samples to download
      :param download_if_already_existing:
          If true, data will always be downloaded
      :param verbose:
          If true, download info will be printed
      """
  
      global_config = NiftyNetGlobalConfig()
  
      config_store = ConfigStore(global_config, verbose=verbose)
  
      # If a single id is specified, convert to a list
      example_ids = (
          [example_ids]
          if not isinstance(example_ids, (tuple, list))
          else example_ids
      )
  
      if not example_ids:
          return False
  
      # Check if the server is running by looking for a known file
      remote_base_url_test = raw_file_url(
          global_config.get_download_server_url()
      )
      server_ok = url_exists(remote_base_url_test)
      if verbose:
          print(
              "Accessing: {}".format(
                  global_config.get_download_server_url()
              )
          )
  
      any_error = False
      for example_id in example_ids:
          if not example_id:
              any_error = True
              continue
          if config_store.exists(example_id):
              update_ok = config_store.update_if_required(
                  example_id, download_if_already_existing
              )
              any_error = (not update_ok) or any_error
          else:
              any_error = True
              if server_ok:
                  print(example_id + ": FAIL. ")
                  print(
                      "No NiftyNet example was found for "
                      + example_id
                      + "."
                  )
  
      # If errors occurred and the server is down report a message
      if any_error and not server_ok:
          print("The NiftyNetExamples server is not running")
  
      return not any_error
  
imports: from __future__ import absolute_import
  from __future__ import print_function
  import argparse
  import math
  import os
  import re
  import shutil
  import tarfile
  import tempfile
  from distutils.version import LooseVersion
  from six.moves.urllib.parse import urlparse
  from six.moves.urllib.request import urlopen
  from six.moves.urllib.request import urlretrieve
  from niftynet.utilities.niftynet_global_config import NiftyNetGlobalConfig
  from niftynet.utilities import NiftyNetLaunchConfig
  from niftynet.utilities.util_common import print_progress_bar
  from niftynet.utilities.versioning import get_niftynet_version, get_niftynet_version_string
label_desc: Use image node_id 1 for calling a global function with example usage: download(example_ids, download_if_already_existing, verbose) and returns: unknown, False