code: def calculate_sha256(filename):
      hash_sha256 = hashlib.sha256()
      blksize = 1024 * 1024
  
      with open(filename, "rb") as f:
          for chunk in iter(lambda: f.read(blksize), b""):
              hash_sha256.update(chunk)
  
      return hash_sha256.hexdigest()
  
file_path: stable-diffusion-webui/modules/hashes.py
imports: import hashlib
  import os.path
  from modules import shared
  import modules.cache
label_desc: Use image node_id 1 for calling a global function with example usage: calculate_sha256(filename) and returns: hash_sha256