code: def test_explain_prediction(boston_train):
      X, y, feature_names = boston_train
      reg = LinearRegression()
      reg.fit(X, y)
      expl = explain_prediction(reg, X[0])
      df = format_as_dataframe(expl)
      check_prediction_df(df, expl)
      check_prediction_df(explain_prediction_df(reg, X[0]), expl)
      df_dict = explain_prediction_dfs(reg, X[0])
      assert set(df_dict.keys()) == {"targets"}
      check_prediction_df(df_dict["targets"], expl)
  
file_path: eli5/tests/test_formatters_as_dataframe.py
imports: from __future__ import print_function
  from itertools import chain
  import pytest
  import numpy
  from sklearn.linear_model import LinearRegression
  from sklearn.ensemble import ExtraTreesRegressor
  from eli5 import format_as_dataframes, format_as_dataframe, explain_weights_df, explain_weights_dfs, explain_prediction_df, explain_prediction_dfs, format_as_text, explain_weights, explain_prediction
  from eli5.base import Explanation, TargetExplanation, FeatureWeight, FeatureWeights, FeatureImportances, TransitionFeatureWeights
label_desc: Use image node_id 4 for calling a global function with example usage: test_explain_prediction(boston_train) without return types