code: def setup_local(
      self,
      explanation,
      model,
      dataset,
      true_y,
      classes,
      features,
      categorical_features,
      true_y_dataset,
      pred_y,
      pred_y_dataset,
      model_task,
      metric,
      max_depth,
      num_leaves,
      min_child_samples,
      sample_dataset,
      model_available,
  ):
      full_dataset = dataset
      if true_y_dataset is None:
          full_true_y = true_y
      else:
          full_true_y = true_y_dataset
      if pred_y_dataset is None:
          full_pred_y = pred_y
      else:
          full_pred_y = pred_y_dataset
      has_explanation = explanation is not None
      probability_y = None
  
      if has_explanation:
          if classes is None:
              has_classes_attr = hasattr(explanation, "classes")
              if has_classes_attr and explanation.classes is not None:
                  classes = explanation.classes
          dataset, true_y = self.input_explanation(
              explanation, dataset, true_y
          )
          row_length = len(dataset)
          # Only check dataset on explanation for row length bounds
          if row_length > 100000:
              raise ValueError(
                  "Exceeds maximum number of rows"
                  "for visualization (100000)"
              )
      elif sample_dataset is not None:
          dataset = sample_dataset
  
      if isinstance(dataset, pd.DataFrame) and hasattr(
          dataset, "columns"
      ):
          self._dataframeColumns = dataset.columns
          self._dfdtypes = dataset.dtypes
      try:
          list_dataset = convert_to_list(dataset)
      except Exception as ex:
          ex_str = _format_exception(ex)
          raise ValueError(
              "Unsupported dataset type, inner error: {}".format(ex_str)
          )
  
      if has_explanation:
          self.input_explanation_data(list_dataset, classes)
          if features is None and hasattr(explanation, "features"):
              features = explanation.features
  
      if model_available:
          predicted_y = self.compute_predicted_y(model, dataset)
      else:
          predicted_y = self.predicted_y_to_list(pred_y)
  
      self.setup_visualization_input(
          classes, predicted_y, list_dataset, true_y, features
      )
  
      if (
          model_available
          and is_classifier(model)
          and dataset is not None
      ):
          try:
              probability_y = model.predict_proba(dataset)
          except Exception as ex:
              ex_str = _format_exception(ex)
              raise ValueError(
                  "Model does not support predict_proba method"
                  " for given dataset type,"
                  " inner error: {}".format(ex_str)
              )
          try:
              probability_y = convert_to_list(probability_y)
          except Exception as ex:
              ex_str = _format_exception(ex)
              raise ValueError(
                  "Model predict_proba output of unsupported type,"
                  "inner error: {}".format(ex_str)
              )
          self.dashboard_input[
              ExplanationDashboardInterface.PROBABILITY_Y
          ] = probability_y
      if model_available:
          self._error_analyzer = ModelAnalyzer(
              model,
              full_dataset,
              full_true_y,
              features,
              categorical_features,
              model_task,
              metric,
              classes,
          )
      else:
          # Model task cannot be unknown when passing predictions
          # Assume classification for backwards compatibility
          if model_task == ModelTask.UNKNOWN:
              model_task = ModelTask.CLASSIFICATION
          self._error_analyzer = PredictionsAnalyzer(
              full_pred_y,
              full_dataset,
              full_true_y,
              features,
              categorical_features,
              model_task,
              metric,
              classes,
          )
      if self._categorical_features:
          self.dashboard_input[
              ExplanationDashboardInterface.CATEGORICAL_MAP
          ] = serialize_json_safe(
              self._error_analyzer.category_dictionary
          )
      # Compute metrics on all data cohort
      if self._error_analyzer.model_task == ModelTask.CLASSIFICATION:
          if self._error_analyzer.metric is None:
              metric = Metrics.ERROR_RATE
          else:
              metric = self._error_analyzer.metric
      else:
          if self._error_analyzer.metric is None:
              metric = Metrics.MEAN_SQUARED_ERROR
          else:
              metric = self._error_analyzer.metric
      if model_available:
          full_pred_y = self.compute_predicted_y(model, full_dataset)
      # If we don't have an explanation or model/probabilities specified
      # we can try to use model task to figure out the method
      if not has_explanation and probability_y is None:
          method = MethodConstants.REGRESSION
          if (
              self._error_analyzer.model_task
              == ModelTask.CLASSIFICATION
          ):
              if len(np.unique(predicted_y)) > 2:
                  method = MethodConstants.MULTICLASS
              else:
                  method = MethodConstants.BINARY
          self.dashboard_input[
              ErrorAnalysisDashboardInterface.METHOD
          ] = method
  
imports: import traceback
  import numpy
  import pandas
  from erroranalysis._internal.constants import Metrics, display_name_to_metric, metric_to_display_name
  from erroranalysis._internal.error_analyzer import ModelAnalyzer, PredictionsAnalyzer
  from erroranalysis._internal.utils import is_spark
  from raiutils.data_processing import convert_to_list, serialize_json_safe
  from raiutils.models import is_classifier
  from responsibleai._interfaces import ErrorAnalysisData
  from .constants import ModelTask
  from .error_analysis_constants import ErrorAnalysisDashboardInterface, MethodConstants
  from .error_handling import _format_exception
  from .explanation_constants import ExplanationDashboardInterface, WidgetRequestResponseConstants
label_desc: Use image node_id 4 for calling the ErrorAnalysisDashboardInput obj's underlying member method code with example usage: obj.setup_local(explanation, model, dataset, true_y, classes, features, categorical_features, true_y_dataset, pred_y, pred_y_dataset, model_task, metric, max_depth, num_leaves, min_child_samples, sample_dataset, model_available) without return types