code: def test_log_explanation_without_active_run(regressor):
      model = regressor.model
      X = regressor.X.values
  
      with mlflow.start_run() as run:
          explanation_uri = mlflow.shap.log_explanation(
              model.predict, X
          )
  
          # Assert no figure is open
          assert len(plt.get_fignums()) == 0
  
          artifact_path = "model_explanations_shap"
          artifacts = set(yield_artifacts(run.info.run_id))
  
          assert explanation_uri == os.path.join(
              run.info.artifact_uri, artifact_path
          )
          assert artifacts == {
              os.path.join(artifact_path, "base_values.npy"),
              os.path.join(artifact_path, "shap_values.npy"),
              os.path.join(artifact_path, "summary_bar_plot.png"),
          }
  
          shap_values = np.load(
              os.path.join(explanation_uri, "shap_values.npy")
          )
          base_values = np.load(
              os.path.join(explanation_uri, "base_values.npy")
          )
          np.testing.assert_array_equal(
              shap_values, regressor.shap_values
          )
          np.testing.assert_array_equal(
              base_values, regressor.base_values
          )
  
imports: import os
  from collections import namedtuple
  import matplotlib.pyplot
  import numpy
  import pandas
  import pytest
  import shap
  from sklearn.datasets import load_diabetes, load_iris
  from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
  import mlflow
  from mlflow import MlflowClient
label_desc: Use image node_id 11 for calling a global function with example usage: test_log_explanation_without_active_run(regressor) without return types