I was actually looking for the full rule’s code. From the rule’s page there’s a code tab and the YAML text you find there is the full rule.
The code you posted above is just the JS script action part of the rule which leaves out a lot of context that can be useful for other users, such as what triggers the rule to run.