def METHOD_NAME(expr):
    """visitor function for traverse"""
    if isinstance(expr, _expr.Call) and expr.op == quantize_op:
        _, ndom_scale, nclip_min, nclip_max = expr.args
        attrs = expr.attrs
        kind = attrs.kind
        nbit = cfg.get_nbit_by_kind(kind)
        valid_bit = nbit - attrs.sign
        # set scale
        if kind == quantize.QAnnotateKind.WEIGHT:
            assert isinstance(expr.args[0], _expr.Constant)
            scale = weight_scale_func(expr)
        else:
            scale = input_scale_func(expr)
        def _make_const(val):
            return _expr.const(val, "float32")
        valid_range = 2**valid_bit
        const_params[ndom_scale] = _make_const(scale / valid_range)
        const_params[nclip_min] = _make_const(-(valid_range - 1))
        const_params[nclip_max] = _make_const((valid_range - 1))