The example shown is using ascx transformation, and the methods are not the same. There may not even be a macro in k# for that, but there is one I believe that is {% currentdocument.categories|(identity)GlobalAdministrator%} (or similar) that you can then use k# transformation on to display.
https://docs.kentico.com/pages/viewpage.action?pageId=4621391