Aerospike.com Background query with a UDF Example Incorrect?

I’m trying to create a record UDF to run on an entire set and i was looking at this example: Apply a UDF | Developer

The write_policy = {'expressions': expr} line in the code appears unused. Is this just an oversight? should it be used? I’m unsure if this is the reason I’m having trouble with my UDF.

Background UDF does support filtering the applicable records in the namespace/set based on an expression passed via the write policy.

e.g. If records bins are: name, age, state … expression can say where state equals “CA” (using the expression syntax) … then apply the background UDF only to records where state equals “CA”.