code: def sha1(
      fname: typing.Union[str, pathlib.Path], block_size: int = 2**16
  ) -> str:
      sha1sum = hashlib.sha1()
  
      with open(fname, "rb") as source:
          block = source.read(block_size)
  
          while len(block) != 0:
              sha1sum.update(block)
              block = source.read(block_size)
  
      return str(sha1sum.hexdigest())
  
imports: import hashlib
  import pathlib
  import typing
label_desc: Use image node_id 1 for calling a global function with example usage: sha1(fname, block_size) and returns: str