How to generate constant factor?

Hello, I want to generate sub_weight factor like the following, but get an error.
Is there anyway to achieve this?
Thanks in advance.

def make_pipeline():   
    
	sub_weight = 0 if EquityPricing.close.latest < 10 else 0.5

    pipeline = Pipeline(
        columns={            
            "sub_weight":sub_weight,
        },

    )
    return pipeline

result = run_pipeline(make_pipeline(), '2018-01-01', '2018-01-01', bundle="sharadar-stk-1d")  
print(result)

Constant factors are one of the enhancements coming in QuantRocket 2.9:

from zipline.pipeline import Constant

sub_weight = Constant(0).where(EquityPricing.close.latest < 10, Constant(0.5))

For now, your best bet is probably to save the boolean condition to columns then calculate the sub_weight on the pipeline output.