Add $locals_id in generator functions namespace