code: def all_explanations():
      all_explainers = get_all_explainers()
      # use the same dataset for both regression and classification
      data = synthetic_classification()
  
      binary_model = RandomForestClassifier()
      binary_model.fit(data["train"]["X"], data["train"]["y"])
  
      regression_model = RandomForestRegressor()
      regression_model.fit(data["train"]["X"], data["train"]["y"])
  
      explanations = []
      for explainer_class, is_classification in all_explainers:
          # if explainer_class == PermutationImportance:
          #     explainer = explainer_class(binary_model, data["train"]["X"], data["train"]["y"])
          if explainer_class.explainer_type == "blackbox":
              if is_classification:
                  explainer = explainer_class(
                      binary_model, data["train"]["X"]
                  )
              else:
                  explainer = explainer_class(
                      regression_model, data["train"]["X"]
                  )
          elif explainer_class.explainer_type == "model":
              explainer = explainer_class()
              explainer.fit(data["train"]["X"], data["train"]["y"])
          elif explainer_class.explainer_type == "specific":
              if is_classification:
                  explainer = explainer_class(
                      binary_model, data["train"]["X"]
                  )
              else:
                  explainer = explainer_class(
                      regression_model, data["train"]["X"]
                  )
          elif explainer_class.explainer_type == "data":
              explainer = explainer_class()
          elif explainer_class.explainer_type == "perf":
              if is_classification:
                  explainer = explainer_class(binary_model)
              else:
                  explainer = explainer_class(regression_model)
          else:
              raise Exception("Not supported explainer type.")
  
          if "local" in explainer.available_explanations:
              with warnings.catch_warnings():
                  if type(explainer).__name__ == "TreeInterpreter":
                      warnings.filterwarnings(
                          "ignore",
                          "Conversion of an array with ndim > 0 to a scalar is deprecated*",
                      )
  
                  explanation = explainer.explain_local(
                      data["test"]["X"].head(), data["test"]["y"].head()
                  )
              explanations.append(explanation)
          if "global" in explainer.available_explanations:
              explanation = explainer.explain_global()
              explanations.append(explanation)
          if "data" in explainer.available_explanations:
              explanation = explainer.explain_data(
                  data["train"]["X"], data["train"]["y"]
              )
              explanations.append(explanation)
          if "perf" in explainer.available_explanations:
              explanation = explainer.explain_perf(
                  data["test"]["X"], data["test"]["y"]
              )
              explanations.append(explanation)
  
      return explanations
  
file_path: interpret/python/interpret-core/tests/test_selenium.py
imports: import warnings
  import pytest
  from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
  from .tutils import synthetic_classification, get_all_explainers
  from interpret import set_show_addr, shutdown_show_server, show_link
  from copy import deepcopy
  import os
label_desc: Use image node_id 1 for calling a global function with example usage: all_explanations() and returns: explanations