import hashlib


def get_file_md5_hash(file_path):
    """ Hashes a file.
    :param file_path: Union[str, pathlib.Path] -> path of the file to hash
    :return: str -> file hash
    """

    etag = hashlib.md5()
    with open(file_path, "rb") as f:
        for byte_block in iter(lambda: f.read(4096), b""):
            etag.update(byte_block)
    return etag.hexdigest()