<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_hash(file_path, checksum='sha1'):
 """ Generate a hash for the given file Args: file_path (str):
 Path to the file to generate the hash for checksum (str):
 hash to apply, one of the supported by hashlib, for example sha1 or sha512 Returns: str: hash for that file """


    sha = getattr(hashlib, checksum)()
    with open(file_path) as file_descriptor:
        while True:
            chunk = file_descriptor.read(65536)
            if not chunk:
                break
            sha.update(chunk)
    return sha.hexdigest()