code: def component_callbacks(self, app):
      @app.callback(
          [
              Output(
                  "random-index-reg-pred-slider-div-" + self.name,
                  "style",
              ),
              Output(
                  "random-index-reg-y-slider-div-" + self.name, "style"
              ),
          ],
          [Input("random-index-reg-preds-or-y-" + self.name, "value")],
      )
      def update_reg_hidden_div_pred_sliders(preds_or_y):
          if preds_or_y == "preds":
              return (None, dict(display="none"))
          elif preds_or_y == "y":
              return (dict(display="none"), None)
          raise PreventUpdate
  
      @app.callback(
          [
              Output(
                  "random-index-reg-residual-slider-div-" + self.name,
                  "style",
              ),
              Output(
                  "random-index-reg-abs-residual-slider-div-"
                  + self.name,
                  "style",
              ),
          ],
          [
              Input(
                  "random-index-reg-abs-residual-" + self.name, "value"
              )
          ],
      )
      def update_reg_hidden_div_pred_sliders(abs_residuals):
          if abs_residuals == "absolute":
              return (dict(display="none"), None)
          else:
              return (None, dict(display="none"))
          raise PreventUpdate
  
      @app.callback(
          [
              Output(
                  "random-index-reg-residual-slider-" + self.name, "min"
              ),
              Output(
                  "random-index-reg-residual-slider-" + self.name, "max"
              ),
              Output(
                  "random-index-reg-residual-slider-" + self.name,
                  "value",
              ),
              Output(
                  "random-index-reg-residual-slider-" + self.name,
                  "marks",
              ),
              Output(
                  "random-index-reg-abs-residual-slider-" + self.name,
                  "min",
              ),
              Output(
                  "random-index-reg-abs-residual-slider-" + self.name,
                  "max",
              ),
              Output(
                  "random-index-reg-abs-residual-slider-" + self.name,
                  "value",
              ),
              Output(
                  "random-index-reg-abs-residual-slider-" + self.name,
                  "marks",
              ),
          ],
          [
              Input(
                  "random-index-reg-pred-slider-" + self.name, "value"
              ),
              Input("random-index-reg-y-slider-" + self.name, "value"),
          ],
          [
              State(
                  "random-index-reg-preds-or-y-" + self.name, "value"
              ),
              State(
                  "random-index-reg-residual-slider-" + self.name,
                  "value",
              ),
              State(
                  "random-index-reg-abs-residual-slider-" + self.name,
                  "value",
              ),
          ],
      )
      def update_residual_slider_limits(
          pred_range,
          y_range,
          preds_or_y,
          residuals_range,
          abs_residuals_range,
      ):
          if preds_or_y == "preds":
              min_residuals = float(
                  self.explainer.residuals[
                      (self.explainer.preds >= pred_range[0])
                      & (self.explainer.preds <= pred_range[1])
                  ].min()
              )
              max_residuals = float(
                  self.explainer.residuals[
                      (self.explainer.preds >= pred_range[0])
                      & (self.explainer.preds <= pred_range[1])
                  ].max()
              )
              min_abs_residuals = float(
                  self.explainer.abs_residuals[
                      (self.explainer.preds >= pred_range[0])
                      & (self.explainer.preds <= pred_range[1])
                  ].min()
              )
              max_abs_residuals = float(
                  self.explainer.abs_residuals[
                      (self.explainer.preds >= pred_range[0])
                      & (self.explainer.preds <= pred_range[1])
                  ].max()
              )
          elif preds_or_y == "y":
              min_residuals = float(
                  self.explainer.residuals[
                      (self.explainer.y >= y_range[0])
                      & (self.explainer.y <= y_range[1])
                  ].min()
              )
              max_residuals = float(
                  self.explainer.residuals[
                      (self.explainer.y >= y_range[0])
                      & (self.explainer.y <= y_range[1])
                  ].max()
              )
              min_abs_residuals = float(
                  self.explainer.abs_residuals[
                      (self.explainer.y >= y_range[0])
                      & (self.explainer.y <= y_range[1])
                  ].min()
              )
              max_abs_residuals = float(
                  self.explainer.abs_residuals[
                      (self.explainer.y >= y_range[0])
                      & (self.explainer.y <= y_range[1])
                  ].max()
              )
  
          new_residuals_range = [
              max(min_residuals, residuals_range[0]),
              min(max_residuals, residuals_range[1]),
          ]
          new_abs_residuals_range = [
              max(min_abs_residuals, abs_residuals_range[0]),
              min(max_abs_residuals, abs_residuals_range[1]),
          ]
          residuals_marks = {
              min_residuals: str(np.round(min_residuals, self.round)),
              max_residuals: str(np.round(max_residuals, self.round)),
          }
          abs_residuals_marks = {
              min_abs_residuals: str(
                  np.round(min_abs_residuals, self.round)
              ),
              max_abs_residuals: str(
                  np.round(max_abs_residuals, self.round)
              ),
          }
          return (
              min_residuals,
              max_residuals,
              new_residuals_range,
              residuals_marks,
              min_abs_residuals,
              max_abs_residuals,
              new_abs_residuals_range,
              abs_residuals_marks,
          )
  
      @app.callback(
          Output("random-index-reg-index-" + self.name, "value"),
          [Input("random-index-reg-button-" + self.name, "n_clicks")],
          [
              State(
                  "random-index-reg-pred-slider-" + self.name, "value"
              ),
              State("random-index-reg-y-slider-" + self.name, "value"),
              State(
                  "random-index-reg-residual-slider-" + self.name,
                  "value",
              ),
              State(
                  "random-index-reg-abs-residual-slider-" + self.name,
                  "value",
              ),
              State(
                  "random-index-reg-preds-or-y-" + self.name, "value"
              ),
              State(
                  "random-index-reg-abs-residual-" + self.name, "value"
              ),
          ],
      )
      def update_index(
          n_clicks,
          pred_range,
          y_range,
          residual_range,
          abs_residuals_range,
          preds_or_y,
          abs_residuals,
      ):
          triggers = [
              trigger["prop_id"]
              for trigger in dash.callback_context.triggered
          ]
          if (
              f"random-index-reg-button-{self.name}.n_clicks"
              not in triggers
          ):
              raise PreventUpdate
          if n_clicks is None and self.index is not None:
              raise PreventUpdate
          if preds_or_y == "preds":
              if abs_residuals == "absolute":
                  return self.explainer.random_index(
                      pred_min=pred_range[0],
                      pred_max=pred_range[1],
                      abs_residuals_min=abs_residuals_range[0],
                      abs_residuals_max=abs_residuals_range[1],
                      return_str=True,
                  )
              else:
                  return self.explainer.random_index(
                      pred_min=pred_range[0],
                      pred_max=pred_range[1],
                      residuals_min=residual_range[0],
                      residuals_max=residual_range[1],
                      return_str=True,
                  )
          elif preds_or_y == "y":
              if abs_residuals == "absolute":
                  return self.explainer.random_index(
                      y_min=y_range[0],
                      y_max=y_range[1],
                      abs_residuals_min=abs_residuals_range[0],
                      abs_residuals_max=abs_residuals_range[1],
                      return_str=True,
                  )
              else:
                  return self.explainer.random_index(
                      y_min=pred_range[0],
                      y_max=pred_range[1],
                      residuals_min=residual_range[0],
                      residuals_max=residual_range[1],
                      return_str=True,
                  )
  
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 4 for calling the RegressionRandomIndexComponent obj's underlying member method code with example usage: obj.component_callbacks(app) and returns: min_residuals,  max_residuals,  new_residuals_range,  residuals_marks,  min_abs_residuals,  max_abs_residuals,  new_abs_residuals_range,  abs_residuals_marks, None,  dict, dict,  None, None,  dict, dict,  None, self, self, self, self