def checksum(im_path, hfunc="sha1", chunk_size=4096):
    """Compute checksum of file at given path

    inputs:
        im_path: String: Path to file to read
        hfunc: String: hashlib function to use for hash. Options are:
                           sha1, sha224, sha256, sha384, sha512, blake2b
                           blake2s, md5
        chunk_size: int: size of binary chunks to use in reading file

    returns:
        checksum_value: String: String of hexadecimal value of checksum
    """
    
    hash_func = eval(f"hashlib.{hfunc}()")
    with open(im_path, "rb") as fid:
        for chunk in iter(lambda: fid.read(chunk_size), b""):
            hash_func.update(chunk)
    return hash_func.hexdigest()