code: def layout(self):
      return dbc.Card(
          [
              make_hideable(
                  dbc.CardHeader(
                      [
                          html.Div(
                              [
                                  html.H3(
                                      self.title,
                                      id="residuals-title-" + self.name,
                                  ),
                                  make_hideable(
                                      html.H6(
                                          self.subtitle,
                                          className="card-subtitle",
                                      ),
                                      hide=self.hide_subtitle,
                                  ),
                                  dbc.Tooltip(
                                      self.description,
                                      target="residuals-title-"
                                      + self.name,
                                  ),
                              ]
                          ),
                      ]
                  ),
                  hide=self.hide_title,
              ),
              dbc.CardBody(
                  [
                      dbc.Row(
                          [
                              dbc.Col(
                                  [
                                      dcc.Graph(
                                          id="residuals-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.Label(
                                                          "Horizontal axis:",
                                                          html_for="residuals-pred-or-actual-"
                                                          + self.name,
                                                      ),
                                                      dbc.Select(
                                                          options=[
                                                              {
                                                                  "label": "Predicted",
                                                                  "value": "vs_pred",
                                                              },
                                                              {
                                                                  "label": "Observed",
                                                                  "value": "vs_actual",
                                                              },
                                                          ],
                                                          value=self.pred_or_actual,
                                                          id="residuals-pred-or-actual-"
                                                          + self.name,
                                                          size="sm",
                                                      ),
                                                  ],
                                                  id="residuals-pred-or-actual-form-"
                                                  + self.name,
                                              ),
                                              dbc.Tooltip(
                                                  "Select what you would like to put on the x-axis:"
                                                  f" observed {self.explainer.target} or predicted {self.explainer.target}.",
                                                  target="residuals-pred-or-actual-form-"
                                                  + self.name,
                                              ),
                                          ],
                                          md=3,
                                      ),
                                      hide=self.hide_pred_or_actual,
                                  ),
                                  make_hideable(
                                      dbc.Col(
                                          [
                                              dbc.Row(
                                                  [
                                                      dbc.Label(
                                                          "Residual type:",
                                                          id="residuals-type-label-"
                                                          + self.name,
                                                          html_for="residuals-type-"
                                                          + self.name,
                                                      ),
                                                      dbc.Tooltip(
                                                          "Type of residuals to display: y-preds (difference), "
                                                          "y/preds (ratio) or log(y/preds) (logratio).",
                                                          target="residuals-type-label-"
                                                          + self.name,
                                                      ),
                                                      dbc.Select(
                                                          id="residuals-type-"
                                                          + self.name,
                                                          options=[
                                                              {
                                                                  "label": "Difference",
                                                                  "value": "difference",
                                                              },
                                                              {
                                                                  "label": "Ratio",
                                                                  "value": "ratio",
                                                              },
                                                              {
                                                                  "label": "Log ratio",
                                                                  "value": "log-ratio",
                                                              },
                                                          ],
                                                          value=self.residuals,
                                                          size="sm",
                                                      ),
                                                  ]
                                              ),
                                          ],
                                          md=3,
                                      ),
                                      hide=self.hide_ratio,
                                  ),
                              ],
                              justify="evenly",
                          ),
                      ]
                  ),
                  hide=self.hide_footer,
              ),
          ]
      )
  
imports: import numpy
  import pandas
  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 ResidualsComponent obj's underlying member method code with example usage: obj.layout() and returns: dbc