code: def fetch_data(files, folder, data_size=None):
      """Downloads files to folder and checks their md5 checksums
  
      Parameters
      ----------
      files : dictionary
          For each file in `files` the value should be (url, md5). The file will
          be downloaded from url if the file does not already exist or if the
          file exists but the md5 checksum does not match.
      folder : str
          The directory where to save the file, the directory will be created if
          it does not already exist.
      data_size : str, optional
          A string describing the size of the data (e.g. "91 MB") to be logged to
          the screen. Default does not produce any information about data size.
      Raises
      ------
      FetcherError
          Raises if the md5 checksum of the file does not match the expected
          value. The downloaded file is not deleted when this error is raised.
  
      """
  
      if not op.exists(folder):
          _log("Creating new folder %s" % folder)
          os.makedirs(folder)
  
      if data_size is not None:
          _log("Data size is approximately %s" % data_size)
  
      all_skip = True
      for f in files:
          url, md5 = files[f]
          fullpath = pjoin(folder, f)
          if op.exists(fullpath) and (_get_file_md5(fullpath) == md5):
              continue
          all_skip = False
          _log('Downloading "%s" to %s' % (f, folder))
          _get_file_data(fullpath, url)
          check_md5(fullpath, md5)
      if all_skip:
          _already_there_msg(folder)
      else:
          _log("Files successfully downloaded to %s" % folder)
  
imports: import os
  import contextlib
  import logging
  import json
  import os.path
  from os.path import join
  from hashlib import md5
  from shutil import copyfileobj
  from tqdm.auto import tqdm
  import numpy
  import nibabel
  import tarfile
  import tempfile
  import zipfile
  from dipy.core.gradients import gradient_table, gradient_table_from_gradient_strength_bvecs
  from dipy.io.gradients import read_bvals_bvecs
  from dipy.io.image import load_nifti, load_nifti_data, save_nifti
  from dipy.io.streamline import load_trk
  from dipy.utils.optpkg import optional_package, TripWire
  from urllib.request import urlopen
label_desc: Use image node_id 7 for calling a global function with example usage: fetch_data(files, folder, data_size) without return types