def METHOD_NAME(self, layout, ctx):
    if ctx.type == 'ID':
        if ctx.id is not None and isinstance(ctx.id, bpy.types.Object):
            layout.label(text=ctx.id.name, icon='OBJECT_DATA')
        else:
            layout.label(text="Invalid id")
    elif ctx.type == 'MODIFIER':
        layout.label(text=ctx.modifier_name, icon='MODIFIER')
    elif ctx.type == 'GROUP_NODE':
        layout.label(text=ctx.ui_name, icon='NODE')
    elif ctx.type == 'SIMULATION_ZONE':
        layout.label(text="Simulation Zone")
    elif ctx.type == 'REPEAT_ZONE':
        layout.label(text="Repeat Zone")
    elif ctx.type == 'VIEWER_NODE':
        layout.label(text=ctx.ui_name)