def METHOD_NAME(self, layout, in_menu=None):
    # I think it is more appropriate place for coding layout of 3d panel
    if not in_menu:
        row = layout.row(align=True)
        menu = row.operator('node.popup_3d_menu', text=f'Show "{self.label or self.name}"', icon=self.bl_icon)
        menu.tree_name = self.id_data.name
        menu.node_name = self.name
    else:
        col = layout.column(align=True)
        row = col.row(align=True)
        row.label(text=self.label or self.name)
        row.prop(self, 'multiple_selection', toggle=True, text='',
                 icon='SNAP_ON' if self.multiple_selection else 'SNAP_OFF')
        for i, val in enumerate(self.string_values):
            col.prop(self, "user_list", toggle=True, index=i, text=val.name)