Not sure what this snippet does, but if it creates a block that is registered as a task named "name", then you can do the same with decorators:<p><pre><code>    def task(f):
       register_task(f.__name__, f)
       return f
    
    @task
    def name(t)
       .....
</code></pre>
or similar.