def _shift_right_logical_raw(x, y):
    if x.dtype.is_unsigned:
        return tf.bitwise.right_shift(x, y)
    else:
        assert (x.dtype == y.dtype)
        orig_dtype = x.dtype
        unsigned_dtype = _SIGNED_TO_UNSIGNED_TABLE[orig_dtype]
        x = tf.cast(x, unsigned_dtype)
        y = tf.cast(y, unsigned_dtype)
        res = tf.bitwise.right_shift(x, y)
        return tf.cast(res, orig_dtype)
def _shift_right_logical_raw(x, y):
    if x.dtype.is_unsigned:
        return tf.bitwise.right_shift(x, y)
    else:
        assert (x.dtype == y.dtype)
        orig_dtype = x.dtype
        unsigned_dtype = _SIGNED_TO_UNSIGNED_TABLE[orig_dtype]
        x = tf.cast(x, unsigned_dtype)
        y = tf.cast(y, unsigned_dtype)
        res = tf.bitwise.right_shift(x, y)
        return tf.cast(res, orig_dtype)