def METHOD_NAME(self, socket, context, layout):
    row = layout.row()
    col = row.column()
    col.ui_units_x = 1.6
    col.label(text=socket.name)
    if socket.is_linked or not socket.use_prop:  # last condition for backward compatibility
        row = row.row()
        row.prop(self, 'align_base_mesh', expand=True)
    else:
        col = row.column()
        col.template_component_menu(socket, 'prop', name=socket.name)