code: def create_lime_explanation(explainer, new_observation, **kwargs):
      # utility function for predict_surrogate(type='lime')
      from lime.lime_tabular import LimeTabularExplainer
  
      explainer_dict, explanation_dict = unpack_kwargs_lime(
          explainer, new_observation, **kwargs
      )
      lime_tabular_explainer = LimeTabularExplainer(**explainer_dict)
      explanation = lime_tabular_explainer.explain_instance(
          **explanation_dict
      )
  
      explanation.plot = types.MethodType(plot_lime_custom, explanation)
      explanation.result = pd.DataFrame(
          explanation.as_list(), columns=["variable", "effect"]
      )
      return explanation
  
file_path: DALEX/python/dalex/dalex/_explainer/utils.py
imports: import numpy
  import pandas
  import types, inspect, warnings
label_desc: Use image node_id 1 for calling a global function with example usage: create_lime_explanation(explainer, new_observation) and returns: explanation