Not standard hashing algorithm!
    Install NumPy for better hashing service.
    >>> from Redy.Tools._py_hash import hash_from_stream
    >>> s = iter((1, 2, 3))
    >>> assert hash_from_stream(3, map(hash, s)) == hash((1, 2, 3))

def hash_from_stream(n, hash_stream):
    """
    Not standard hashing algorithm!
    Install NumPy for better hashing service.
    >>> from Redy.Tools._py_hash import hash_from_stream
    >>> s = iter((1, 2, 3))
    >>> assert hash_from_stream(3, map(hash, s)) == hash((1, 2, 3))

    """
    _to_int64 = to_int64
    x = 0x345678
    multiplied = _to_int64(1000003)
    for n in range(n - 1, -1, -1):
        h = next(hash_stream)
        x = _to_int64((x ^ h) * multiplied)
        multiplied += _to_int64(82520 + _to_int64(2 * n))
        multiplied = _to_int64(multiplied)

    x += 97531
    x = _to_int64(x)
    if x == -1:
        return -2

    return x