<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_for_file(repo: Repo, path: Union[str, Path]) -> str: """ Returns the hash for the specified path. Equivalent to ``git rev-parse HEAD:X`` :param repo: The repo to check in :param path: The path to a file or folder to get hash for :return: The hash """

    return repo.git.rev_parse(f"HEAD:{str(path)}")