code: def _make_fetcher(
      name,
      folder,
      baseurl,
      remote_fnames,
      local_fnames,
      md5_list=None,
      doc="",
      data_size=None,
      msg=None,
      unzip=False,
  ):
      """Create a new fetcher
  
      Parameters
      ----------
      name : str
          The name of the fetcher function.
      folder : str
          The full path to the folder in which the files would be placed locally.
          Typically, this is something like 'pjoin(dipy_home, 'foo')'
      baseurl : str
          The URL from which this fetcher reads files
      remote_fnames : list of strings
          The names of the files in the baseurl location
      local_fnames : list of strings
          The names of the files to be saved on the local filesystem
      md5_list : list of strings, optional
          The md5 checksums of the files. Used to verify the content of the
          files. Default: None, skipping checking md5.
      doc : str, optional.
          Documentation of the fetcher.
      data_size : str, optional.
          If provided, is sent as a message to the user before downloading
          starts.
      msg : str, optional.
          A message to print to screen when fetching takes place. Default (None)
          is to print nothing
      unzip : bool, optional
          Whether to unzip the file(s) after downloading them. Supports zip, gz,
          and tar.gz files.
      returns
      -------
      fetcher : function
          A function that, when called, fetches data according to the designated
          inputs
      """
  
      def fetcher():
          files = {}
          for (
              i,
              (f, n),
          ) in enumerate(zip(remote_fnames, local_fnames)):
              files[n] = (
                  baseurl + f,
                  md5_list[i] if md5_list is not None else None,
              )
          fetch_data(files, folder, data_size)
  
          if msg is not None:
              _log(msg)
          if unzip:
              for f in local_fnames:
                  split_ext = op.splitext(f)
                  if split_ext[-1] in (".gz", ".bz2"):
                      if op.splitext(split_ext[0])[-1] == ".tar":
                          ar = tarfile.open(pjoin(folder, f))
                          ar.extractall(path=folder)
                          ar.close()
                      else:
                          raise ValueError(
                              "File extension is not recognized"
                          )
                  elif split_ext[-1] == ".zip":
                      z = zipfile.ZipFile(pjoin(folder, f), "r")
                      files[f] += (tuple(z.namelist()),)
                      z.extractall(folder)
                      z.close()
                  else:
                      raise ValueError(
                          "File extension is not recognized"
                      )
  
          return files, folder
  
      fetcher.__name__ = name
      fetcher.__doc__ = doc
      return fetcher
  
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 8 for calling a global function with example usage: _make_fetcher(name, folder, baseurl, remote_fnames, local_fnames, md5_list, doc, data_size, msg, unzip) and returns: fetcher, files,  folder