code: def get_hashval(inputdict, skip=None):
      """Return a dictionary of our items with hashes for each file.
  
      Searches through dictionary items and if an item is a file, it
      calculates the md5 hash of the file contents and stores the
      file name and hash value as the new key value.
  
      However, the overall bunch hash is calculated only on the hash
      value of a file. The path and name of the file are not used in
      the overall hash calculation.
  
      Returns
      -------
      dict_withhash : dict
          Copy of our dictionary with the new file hashes included
          with each file.
      hashvalue : str
          The md5 hash value of the traited spec
  
      """
  
      dict_withhash = {}
      dict_nofilename = OrderedDict()
      keys = {}
      for key in inputdict:
          if skip is not None and key in skip:
              continue
          keys[key.uri] = key
      for key in sorted(keys):
          val = inputdict[keys[key]]
          outname = key
          try:
              if isinstance(val, pm.URIRef):
                  val = val.decode()
          except AttributeError:
              pass
          if isinstance(val, pm.QualifiedName):
              val = val.uri
          if isinstance(val, pm.Literal):
              val = val.value
          dict_nofilename[outname] = _get_sorteddict(val)
          dict_withhash[outname] = _get_sorteddict(val, True)
          sorted_dict = str(sorted(dict_nofilename.items()))
      return (dict_withhash, md5(sorted_dict.encode()).hexdigest())
  
imports: from collections import OrderedDict
  from copy import deepcopy
  from pickle import dumps
  import os
  import getpass
  import platform
  from uuid import uuid1
  import simplejson
  import numpy
  import prov.model
  from ..None import get_info, logging, __version__
  from .filemanip import md5, hashlib, hash_infile
label_desc: Use image node_id 2 for calling a global function with example usage: get_hashval(inputdict, skip) and returns: dict_withhash,  md5