$densify.unit is not resolved

I am trying to put a variable into $densify.range.unit while performing a stage of aggregation, but getting error query failed: (FailedToParse) unknown time unit value: $time_unit
Is there a way to fix it?
Demo: Mongo playground

Comparing the documentation between dateTrunk and densify, dateTrunc says unit can take in an expression that must evaluate to one of the known units, but densify does not say this, only that you should pass in the unit.
Perhaps densify does not allow you to pass in an expression?

The unit of time, specified as an expression that must resolve to one of these strings:


The unit to apply to the step field when incrementing date values in field.

Thank you for pointing this out, I didnt notice that. Seems I should search for a walkaround for now. However the possibility to pass expressions into $desify’s arguments seems to be useful. I’ve just discovered that $densify.range.bounds also does not accept expressions. Probably we can create a feautre request?