code: def build_and_dump_explainer(explainer_config, dashboard_config=None):
      explainer = build_explainer(explainer_config)
  
      click.echo(
          f"explainerdashboard ===> Calculating properties by building Dashboard..."
      )
      if dashboard_config is not None:
          ExplainerDashboard.from_config(explainer, dashboard_config)
      elif Path(
          explainer_config["explainer"]["dashboard_yaml"]
      ).exists():
          click.echo(
              f"explainerdashboard ===> Calculating properties by building Dashboard from {explainer_config['explainer']['dashboard_yaml']}..."
          )
          dashboard_config = yaml.safe_load(
              open(
                  str(explainer_config["explainer"]["dashboard_yaml"]),
                  "r",
              )
          )
          ExplainerDashboard.from_config(explainer, dashboard_config)
      else:
          click.echo(
              f"explainerdashboard ===> Calculating all properties"
          )
          explainer.calculate_properties()
  
      click.echo(
          f"explainerdashboard ===> Saving explainer to {explainer_config['explainer']['explainerfile']}..."
      )
      if (
          dashboard_config is not None
          and explainer_config["explainer"]["explainerfile"]
          != dashboard_config["dashboard"]["explainerfile"]
      ):
          click.echo(
              f"explainerdashboard ===> Warning explainerfile in explainer config and dashboard config do not match!"
          )
      explainer.dump(explainer_config["explainer"]["explainerfile"])
      return
  
imports: import os
  import webbrowser
  from pathlib import Path
  from importlib import import_module
  from copy import deepcopy
  import pickle
  import oyaml
  import pandas
  import joblib
  import click
  import waitress
  from explainerdashboard import *
  from explainerdashboard.explainers import BaseExplainer
  from explainerdashboard.dashboards import ExplainerDashboard
label_desc: Use image node_id 2 for calling a global function with example usage: build_and_dump_explainer(explainer_config, dashboard_config) without return types