code: def check_md5(filename, stored_md5=None):
      """
      Computes the md5 of filename and check if it matches with the supplied
      string md5
  
      Parameters
      ----------
      filename : string
          Path to a file.
      md5 : string
          Known md5 of filename to check against. If None (default), checking is
          skipped
      """
      if stored_md5 is not None:
          computed_md5 = _get_file_md5(filename)
          if stored_md5 != computed_md5:
              msg = """The downloaded file, %s, does not have the expected md5
     checksum of "%s". Instead, the md5 checksum was: "%s". This could mean that
     something is wrong with the file or that the upstream file has been updated.
     You can try downloading the file again or updating to the newest version of
     dipy.""" % (
                  filename,
                  stored_md5,
                  computed_md5,
              )
              raise FetcherError(msg)
  
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 5 for calling a global function with example usage: check_md5(filename, stored_md5) without return types