code: def changed(dirname, filename='.md5', args=None, glob=None):
      
      root = Path(dirname)
      if not root.exists():
          # if dirname doesn't exist it is changed (by definition)
          return True
  
      cachefile = root / filename
      current_digest = cachefile.open().read() if cachefile.exists() else ""
      
      _digest = digest(dirname, glob=glob)
      if args and args.verbose:  # pragma: nocover
          print("md5:", _digest)
      has_changed = current_digest != _digest
  
      if has_changed:
          with open(os.path.join(dirname, filename), 'w') as fp:
              fp.write(_digest)
  
      return has_changed
docs: Has `glob` changed in `dirname`
  
      Args:
          dirname: directory to measure
          filename: filename to store checksum