docstr: Initialize the Explanation Dashboard Input.
  
  :param analysis:
      A RAIInsights object that represents an explanation.
  :type analysis: RAIInsights
  :param cohort_list:
      List of cohorts defined by the user for the dashboard.
  :type cohort_list: List[Cohort]
docstr_tok: ["Initialize","the","Explanation","Dashboard","Input",".",":","param","analysis",":","A","RAIInsights","object","that","represents","an","explanation",".",":","type","analysis",":","RAIInsights",":","param","cohort_list",":","List","of","cohorts","defined","by","the","user","for","the","dashboard",".",":","type","cohort_list",":","List","[","Cohort","]"]
code: def __init__(
      self,
      analysis: RAIInsights,
      cohort_list: Optional[List[Cohort]] = None,
  ):
      """Initialize the Explanation Dashboard Input.
  
      :param analysis:
          A RAIInsights object that represents an explanation.
      :type analysis: RAIInsights
      :param cohort_list:
          List of cohorts defined by the user for the dashboard.
      :type cohort_list: List[Cohort]
      """
      self._analysis = analysis
      model = analysis.model
      self._is_classifier = is_classifier(model)
      self.dashboard_input = analysis.get_data()
  
      self._validate_cohort_list(cohort_list)
  
      self._feature_length = len(
          self.dashboard_input.dataset.feature_names
      )
      if hasattr(analysis, ManagerNames.ERROR_ANALYSIS):
          self._error_analyzer = analysis.error_analysis._analyzer
  
imports: import traceback
  from typing import List, Optional
  import numpy
  import pandas
  from erroranalysis._internal.constants import display_name_to_metric
  from raiutils.cohort import Cohort, CohortFilter, CohortFilterMethods
  from raiutils.data_processing import convert_to_list, serialize_json_safe
  from raiutils.exceptions import UserConfigValidationException
  from raiutils.models import ModelTask, is_classifier
  from raiwidgets.constants import ErrorMessages
  from raiwidgets.error_handling import _format_exception
  from raiwidgets.interfaces import WidgetRequestResponseConstants
  from responsibleai import RAIInsights
  from responsibleai._internal.constants import ManagerNames
label_desc: Use image node_id 1 to create a new ResponsibleAIDashboardInput object  with example: obj = ResponsibleAIDashboardInput(analysis, cohort_list)