code: def layout(self):
      return dbc.Card(
          [
              make_hideable(
                  dbc.CardHeader(
                      [
                          html.Div(
                              [
                                  html.H3(
                                      self.title,
                                      id="shap-dependence-title-"
                                      + self.name,
                                  ),
                                  make_hideable(
                                      html.H6(
                                          self.subtitle,
                                          className="card-subtitle",
                                      ),
                                      hide=self.hide_subtitle,
                                  ),
                                  dbc.Tooltip(
                                      self.description,
                                      target="shap-dependence-title-"
                                      + self.name,
                                  ),
                              ]
                          ),
                      ]
                  ),
                  hide=self.hide_title,
              ),
              dbc.CardBody(
                  [
                      dbc.Row(
                          [
                              make_hideable(
                                  dbc.Col(
                                      [self.selector.layout()], width=2
                                  ),
                                  hide=self.hide_selector,
                              ),
                          ]
                      ),
                      dbc.Row(
                          [
                              make_hideable(
                                  dbc.Col(
                                      [
                                          dbc.Label(
                                              "Feature:",
                                              id="shap-dependence-col-label-"
                                              + self.name,
                                          ),
                                          dbc.Tooltip(
                                              "Select feature to display shap dependence for",
                                              target="shap-dependence-col-label-"
                                              + self.name,
                                          ),
                                          dbc.Select(
                                              id="shap-dependence-col-"
                                              + self.name,
                                              options=[
                                                  {
                                                      "label": col,
                                                      "value": col,
                                                  }
                                                  for col in self.explainer.columns_ranked_by_shap()
                                              ],
                                              value=self.col,
                                              size="sm",
                                          ),
                                      ],
                                      md=3,
                                  ),
                                  self.hide_col,
                              ),
                              make_hideable(
                                  dbc.Col(
                                      [
                                          dbc.Label(
                                              "Color feature:",
                                              id="shap-dependence-color-col-label-"
                                              + self.name,
                                          ),
                                          dbc.Tooltip(
                                              "Select feature to color the scatter markers by. This "
                                              "allows you to see interactions between various features in the graph.",
                                              target="shap-dependence-color-col-label-"
                                              + self.name,
                                          ),
                                          dbc.Select(
                                              id="shap-dependence-color-col-"
                                              + self.name,
                                              options=[
                                                  {
                                                      "label": col,
                                                      "value": col,
                                                  }
                                                  for col in self.explainer.columns_ranked_by_shap()
                                              ]
                                              + [
                                                  dict(
                                                      label="None",
                                                      value="no_color_col",
                                                  )
                                              ],
                                              value=self.color_col,
                                              size="sm",
                                          ),
                                      ],
                                      md=3,
                                  ),
                                  self.hide_color_col,
                              ),
                              make_hideable(
                                  dbc.Col(
                                      [
                                          dbc.Label(
                                              f"{self.explainer.index_name}:",
                                              id="shap-dependence-index-label-"
                                              + self.name,
                                          ),
                                          dbc.Tooltip(
                                              f"Select {self.explainer.index_name} to highlight in the plot."
                                              "You can also select by clicking on a scatter marker in the accompanying"
                                              " shap summary plot (detailed).",
                                              target="shap-dependence-index-label-"
                                              + self.name,
                                          ),
                                          self.index_selector.layout(),
                                      ],
                                      md=4,
                                  ),
                                  hide=self.hide_index,
                              ),
                          ]
                      ),
                      dcc.Loading(
                          id="loading-dependence-graph-" + self.name,
                          children=[
                              dcc.Graph(
                                  id="shap-dependence-graph-"
                                  + self.name,
                                  config=dict(
                                      modeBarButtons=[["toImage"]],
                                      displaylogo=False,
                                  ),
                              )
                          ],
                      ),
                      dbc.Row(
                          [
                              make_hideable(
                                  dbc.Col(
                                      [self.popout.layout()],
                                      md=2,
                                      align="start",
                                  ),
                                  hide=self.hide_popout,
                              ),
                          ],
                          justify="end",
                      ),
                  ]
              ),
              make_hideable(
                  dbc.CardFooter(
                      [
                          dbc.Row(
                              [
                                  make_hideable(
                                      dbc.Col(
                                          [
                                              dbc.Row(
                                                  [
                                                      dbc.Tooltip(
                                                          "Remove outliers in feature (and color feature) from plot.",
                                                          target="shap-dependence-outliers-"
                                                          + self.name,
                                                      ),
                                                      dbc.Checklist(
                                                          options=[
                                                              {
                                                                  "label": "Remove outliers",
                                                                  "value": True,
                                                              }
                                                          ],
                                                          value=[True]
                                                          if self.remove_outliers
                                                          else [],
                                                          id="shap-dependence-outliers-"
                                                          + self.name,
                                                          inline=True,
                                                          switch=True,
                                                      ),
                                                  ]
                                              ),
                                          ],
                                          md=2,
                                      ),
                                      hide=self.hide_outliers,
                                  ),
                                  make_hideable(
                                      dbc.Col(
                                          [
                                              html.Div(
                                                  [
                                                      dbc.Label(
                                                          "Categories:",
                                                          id="shap-dependence-n-categories-label-"
                                                          + self.name,
                                                      ),
                                                      dbc.Tooltip(
                                                          "Maximum number of categories to display",
                                                          target="shap-dependence-n-categories-label-"
                                                          + self.name,
                                                      ),
                                                      dbc.Input(
                                                          id="shap-dependence-n-categories-"
                                                          + self.name,
                                                          value=self.cats_topx,
                                                          type="number",
                                                          min=1,
                                                          max=50,
                                                          step=1,
                                                      ),
                                                  ],
                                                  id="shap-dependence-categories-div1-"
                                                  + self.name,
                                                  style={}
                                                  if self.col
                                                  in self.explainer.cat_cols
                                                  else dict(
                                                      display="none"
                                                  ),
                                              )
                                          ],
                                          md=2,
                                      ),
                                      self.hide_cats_topx,
                                  ),
                                  make_hideable(
                                      dbc.Col(
                                          [
                                              html.Div(
                                                  [
                                                      html.Label(
                                                          "Sort categories:",
                                                          id="shap-dependence-categories-sort-label-"
                                                          + self.name,
                                                      ),
                                                      dbc.Tooltip(
                                                          "How to sort the categories: Alphabetically, most common "
                                                          "first (Frequency), or highest mean absolute SHAP value first (Shap impact)",
                                                          target="shap-dependence-categories-sort-label-"
                                                          + self.name,
                                                      ),
                                                      dbc.Select(
                                                          id="shap-dependence-categories-sort-"
                                                          + self.name,
                                                          options=[
                                                              {
                                                                  "label": "Alphabetically",
                                                                  "value": "alphabet",
                                                              },
                                                              {
                                                                  "label": "Frequency",
                                                                  "value": "freq",
                                                              },
                                                              {
                                                                  "label": "Shap impact",
                                                                  "value": "shap",
                                                              },
                                                          ],
                                                          value=self.cats_sort,
                                                          size="sm",
                                                      ),
                                                  ],
                                                  id="shap-dependence-categories-div2-"
                                                  + self.name,
                                                  style={}
                                                  if self.col
                                                  in self.explainer.cat_cols
                                                  else dict(
                                                      display="none"
                                                  ),
                                              )
                                          ],
                                          md=4,
                                      ),
                                      hide=self.hide_cats_sort,
                                  ),
                              ]
                          )
                      ]
                  ),
                  hide=self.hide_footer,
              ),
          ],
          class_name="h-100",
      )
  
imports: import dash
  from dash import html, dcc, Input, Output, State
  from dash.exceptions import PreventUpdate
  import dash_bootstrap_components
  from ..dashboard_methods import *
  from ..None import to_html
label_desc: Use image node_id 2 for calling the ShapDependenceComponent obj's underlying member method code with example usage: obj.layout() and returns: dbc