class_docstr: Bridge pattern decoupling the application part from SmartExplainer and SmartPlotter.
  Attributes
  ----------
  explainer: object
      SmartExplainer instance to point to.
class_docstr_tok: ["Bridge","pattern","decoupling","the","application","part","from","SmartExplainer","and","SmartPlotter",".","Attributes","--","--","--","--","--","explainer",":","object","SmartExplainer","instance","to","point","to","."]
docstr: Override menu from explainer object depending on
  classification or regression case.
docstr_tok: ["Override","menu","from","explainer","object","depending","on","classification","or","regression","case","."]
code: def adjust_menu(self):
      """
      Override menu from explainer object depending on
      classification or regression case.
      """
      on_style = {
          "backgroundColor": self.color[0],
          "color": self.bkg_color,
          "margin-top": "0.5rem",
          "margin-right": "0.5rem",
      }
      off_style = {"display": "none"}
      if self.explainer._case == "classification":
          self.components["menu"]["select_label"].options = [
              {
                  "label": f"{self.explainer.label_dict[label] if self.explainer.label_dict else label}",
                  "value": label,
              }
              for label in self.explainer._classes
          ]
          self.components["menu"][
              "classification_badge"
          ].style = on_style
          self.components["menu"]["regression_badge"].style = off_style
          self.components["menu"]["select_label"].value = self.label
  
      elif self.explainer._case == "regression":
          self.components["menu"][
              "classification_badge"
          ].style = off_style
          self.components["menu"]["regression_badge"].style = on_style
          self.components["menu"]["select_collapse"].is_open = False
  
      else:
          raise ValueError(
              f"No rule defined for explainer case : {self.explainer._case}"
          )
  
imports: import copy
  import dash
  from dash import dash_table
  import dash_daq
  from dash import no_update
  from dash.exceptions import PreventUpdate
  import dash_bootstrap_components
  from dash import dcc
  from dash import html
  from dash import MATCH, ALL
  from dash.dependencies import Output, Input, State
  from flask import Flask
  import pandas
  import plotly.graph_objs
  import random
  import re
  from math import log10
  from shapash.webapp.utils.utils import check_row, get_index_type, round_to_k
  from shapash.webapp.utils.MyGraph import MyGraph
  from shapash.utils.utils import truncate_str
  from shapash.webapp.utils.explanations import Explanations
  from shapash.webapp.utils.callbacks import select_data_from_prediction_picking, select_data_from_str_filters, select_data_from_bool_filters, select_data_from_numeric_filters, select_data_from_date_filters, get_feature_from_clicked_data, get_feature_from_features_groups, get_group_name, get_indexes_from_datatable, update_click_data_on_subset_changes, get_figure_zoom, get_feature_contributions_sign_to_show, update_features_to_display, get_id_card_features, get_id_card_contrib, create_id_card_data, create_id_card_layout, get_feature_filter_options, create_dropdown_feature_filter, create_filter_modalities_selection
label_desc: Use image node_id 5 for calling the SmartApp obj's underlying member method code with example usage: obj.adjust_menu() without return types