code: def test_responsibleai_housing_save_and_load(
      self,
      tmpdir,
      create_rai_insights_object_regression_with_model,
      create_rai_insights_object_regression_with_predictions,
      with_model,
  ):
      if with_model:
          ri = create_rai_insights_object_regression_with_model
      else:
          ri = create_rai_insights_object_regression_with_predictions
  
      widget = ResponsibleAIDashboard(ri)
      self.validate_rai_dashboard_data(widget, with_model=with_model)
      self.validate_widget_end_points(widget)
  
      save_dir = tmpdir.mkdir("save-dir")
      ri.save(save_dir)
      ri_copy = ri.load(save_dir)
  
      # There seems to be a bug when loading the model wrapper in
      # regression case.
      if with_model:
          widget_copy = ResponsibleAIDashboard(ri_copy)
          self.validate_rai_dashboard_data(
              widget_copy, with_model=with_model
          )
          self.validate_widget_end_points(widget_copy)
  
file_path: responsible-ai-toolbox/raiwidgets/tests/responsibleai_dashboard/test_responsibleai_dashboard.py
imports: import json
  import re
  import pytest
  from raiutils.cohort import Cohort, CohortFilter, CohortFilterMethods
  from raiutils.data_processing import serialize_json_safe
  from raiutils.exceptions import UserConfigValidationException
  from raiwidgets import ResponsibleAIDashboard
  from raiwidgets.dashboard import invalid_feature_flights_error
  from responsibleai._interfaces import CausalData, CounterfactualData, Dataset, ErrorAnalysisData, ModelExplanationData
label_desc: Use image node_id 4 for calling the TestResponsibleAIDashboard obj's underlying member method code with example usage: obj.test_responsibleai_housing_save_and_load(tmpdir, create_rai_insights_object_regression_with_model, create_rai_insights_object_regression_with_predictions, with_model) without return types