code: def has_changed (filename):
      
      key = os.path.abspath(filename)
      mtime = get_mtime(key)
      if key not in _mtime_cache:
          _mtime_cache[key] = mtime
          return True
      return mtime > _mtime_cache[key]
docs: Check if filename has changed since the last check. If this
      is the first check, assume the file is changed.