code: def SHA1_file(filepath, extra=b''):
      
      h = hashlib.sha1()
      with io.open(filepath, 'rb') as f:
          for chunk in iter(lambda: f.read(h.block_size), b''):
              h.update(chunk)
      h.update(extra)
      return h.hexdigest()
docs: Returns hex digest of SHA1 hash of file at filepath
  
      :param str filepath: File to hash
  
      :param bytes extra: Extra content added to raw read of file before taking hash
  
      :return: hex digest of hash
  
      :rtype: str